mirror of
https://github.com/logos-messaging/logos-messaging-go-bindings.git
synced 2026-01-04 06:53:11 +00:00
adding configurations for lightpush, filter and store
This commit is contained in:
parent
59f8461895
commit
bcf0dd8c0e
@ -327,23 +327,37 @@ import (
|
|||||||
const requestTimeout = 30 * time.Second
|
const requestTimeout = 30 * time.Second
|
||||||
|
|
||||||
type WakuConfig struct {
|
type WakuConfig struct {
|
||||||
Host string `json:"host,omitempty"`
|
Host string `json:"host,omitempty"`
|
||||||
Port int `json:"port,omitempty"`
|
Port int `json:"port,omitempty"`
|
||||||
NodeKey string `json:"key,omitempty"`
|
Nodekey string `json:"nodekey,omitempty"`
|
||||||
EnableRelay bool `json:"relay"`
|
Relay bool `json:"relay,omitempty"`
|
||||||
LogLevel string `json:"logLevel"`
|
Store bool `json:"store,omitempty"`
|
||||||
DnsDiscovery bool `json:"dnsDiscovery,omitempty"`
|
Storenode string `json:"storenode,omitempty"`
|
||||||
DnsDiscoveryUrl string `json:"dnsDiscoveryUrl,omitempty"`
|
StoreMessageRetentionPolicy string `json:"storeMessageRetentionPolicy,omitempty"`
|
||||||
MaxMessageSize string `json:"maxMessageSize,omitempty"`
|
StoreMessageDbUrl string `json:"storeMessageDbUrl,omitempty"`
|
||||||
Staticnodes []string `json:"staticnodes,omitempty"`
|
StoreMessageDbVacuum bool `json:"storeMessageDbVacuum,omitempty"`
|
||||||
Discv5BootstrapNodes []string `json:"discv5BootstrapNodes,omitempty"`
|
StoreMaxNumDbConnections int `json:"storeMaxNumDbConnections,omitempty"`
|
||||||
Discv5Discovery bool `json:"discv5Discovery,omitempty"`
|
StoreResume bool `json:"storeResume,omitempty"`
|
||||||
Discv5UdpPort uint16 `json:"discv5UdpPort,omitempty"`
|
Filter bool `json:"filter,omitempty"`
|
||||||
ClusterID uint16 `json:"clusterId,omitempty"`
|
Filternode string `json:"filternode,omitempty"`
|
||||||
Shards []uint16 `json:"shards,omitempty"`
|
FilterSubscriptionTimeout int64 `json:"filterSubscriptionTimeout,omitempty"`
|
||||||
PeerExchange bool `json:"peerExchange,omitempty"`
|
FilterMaxPeersToServe uint32 `json:"filterMaxPeersToServe,omitempty"`
|
||||||
PeerExchangeNode string `json:"peerExchangeNode,omitempty"`
|
FilterMaxCriteria uint32 `json:"filterMaxCriteria,omitempty"`
|
||||||
TcpPort uint16 `json:"tcpPort,omitempty"`
|
Lightpush bool `json:"lightpush,omitempty"`
|
||||||
|
LightpushNode string `json:"lightpushnode,omitempty"`
|
||||||
|
LogLevel string `json:"logLevel,omitempty"`
|
||||||
|
DnsDiscovery bool `json:"dnsDiscovery,omitempty"`
|
||||||
|
DnsDiscoveryUrl string `json:"dnsDiscoveryUrl,omitempty"`
|
||||||
|
MaxMessageSize string `json:"maxMessageSize,omitempty"`
|
||||||
|
Staticnodes []string `json:"staticnodes,omitempty"`
|
||||||
|
Discv5BootstrapNodes []string `json:"discv5BootstrapNodes,omitempty"`
|
||||||
|
Discv5Discovery bool `json:"discv5Discovery,omitempty"`
|
||||||
|
Discv5UdpPort uint16 `json:"discv5UdpPort,omitempty"`
|
||||||
|
ClusterID uint16 `json:"clusterId,omitempty"`
|
||||||
|
Shards []uint16 `json:"shards,omitempty"`
|
||||||
|
PeerExchange bool `json:"peerExchange,omitempty"`
|
||||||
|
PeerExchangeNode string `json:"peerExchangeNode,omitempty"`
|
||||||
|
TcpPort uint16 `json:"tcpPort,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Waku represents a dark communication interface through the Ethereum
|
// Waku represents a dark communication interface through the Ethereum
|
||||||
|
|||||||
@ -35,8 +35,8 @@ func TestBasicWaku(t *testing.T) {
|
|||||||
|
|
||||||
nwakuConfig := WakuConfig{
|
nwakuConfig := WakuConfig{
|
||||||
Port: 30303,
|
Port: 30303,
|
||||||
NodeKey: "11d0dcea28e86f81937a3bd1163473c7fbc0a0db54fd72914849bc47bdf78710",
|
Nodekey: "11d0dcea28e86f81937a3bd1163473c7fbc0a0db54fd72914849bc47bdf78710",
|
||||||
EnableRelay: true,
|
Relay: true,
|
||||||
LogLevel: "DEBUG",
|
LogLevel: "DEBUG",
|
||||||
DnsDiscoveryUrl: "enrtree://AMOJVZX4V6EXP7NTJPMAYJYST2QP6AJXYW76IU6VGJS7UVSNDYZG4@boot.prod.status.nodes.status.im",
|
DnsDiscoveryUrl: "enrtree://AMOJVZX4V6EXP7NTJPMAYJYST2QP6AJXYW76IU6VGJS7UVSNDYZG4@boot.prod.status.nodes.status.im",
|
||||||
DnsDiscovery: true,
|
DnsDiscovery: true,
|
||||||
@ -185,7 +185,7 @@ func TestPeerExchange(t *testing.T) {
|
|||||||
|
|
||||||
// start node that will be discovered by PeerExchange
|
// start node that will be discovered by PeerExchange
|
||||||
discV5NodeWakuConfig := WakuConfig{
|
discV5NodeWakuConfig := WakuConfig{
|
||||||
EnableRelay: true,
|
Relay: true,
|
||||||
LogLevel: "DEBUG",
|
LogLevel: "DEBUG",
|
||||||
Discv5Discovery: true,
|
Discv5Discovery: true,
|
||||||
ClusterID: 16,
|
ClusterID: 16,
|
||||||
@ -209,7 +209,7 @@ func TestPeerExchange(t *testing.T) {
|
|||||||
|
|
||||||
// start node which serves as PeerExchange server
|
// start node which serves as PeerExchange server
|
||||||
pxServerWakuConfig := WakuConfig{
|
pxServerWakuConfig := WakuConfig{
|
||||||
EnableRelay: true,
|
Relay: true,
|
||||||
LogLevel: "DEBUG",
|
LogLevel: "DEBUG",
|
||||||
Discv5Discovery: true,
|
Discv5Discovery: true,
|
||||||
ClusterID: 16,
|
ClusterID: 16,
|
||||||
@ -254,7 +254,7 @@ func TestPeerExchange(t *testing.T) {
|
|||||||
|
|
||||||
// start light node which uses PeerExchange to discover peers
|
// start light node which uses PeerExchange to discover peers
|
||||||
pxClientWakuConfig := WakuConfig{
|
pxClientWakuConfig := WakuConfig{
|
||||||
EnableRelay: false,
|
Relay: false,
|
||||||
LogLevel: "DEBUG",
|
LogLevel: "DEBUG",
|
||||||
Discv5Discovery: false,
|
Discv5Discovery: false,
|
||||||
ClusterID: 16,
|
ClusterID: 16,
|
||||||
@ -315,7 +315,7 @@ func TestDnsDiscover(t *testing.T) {
|
|||||||
|
|
||||||
nameserver := "8.8.8.8"
|
nameserver := "8.8.8.8"
|
||||||
nodeWakuConfig := WakuConfig{
|
nodeWakuConfig := WakuConfig{
|
||||||
EnableRelay: true,
|
Relay: true,
|
||||||
LogLevel: "DEBUG",
|
LogLevel: "DEBUG",
|
||||||
ClusterID: 16,
|
ClusterID: 16,
|
||||||
Shards: []uint16{64},
|
Shards: []uint16{64},
|
||||||
@ -343,7 +343,7 @@ func TestDial(t *testing.T) {
|
|||||||
|
|
||||||
// start node that will initiate the dial
|
// start node that will initiate the dial
|
||||||
dialerNodeWakuConfig := WakuConfig{
|
dialerNodeWakuConfig := WakuConfig{
|
||||||
EnableRelay: true,
|
Relay: true,
|
||||||
LogLevel: "DEBUG",
|
LogLevel: "DEBUG",
|
||||||
Discv5Discovery: false,
|
Discv5Discovery: false,
|
||||||
ClusterID: 16,
|
ClusterID: 16,
|
||||||
@ -359,7 +359,7 @@ func TestDial(t *testing.T) {
|
|||||||
|
|
||||||
// start node that will receive the dial
|
// start node that will receive the dial
|
||||||
receiverNodeWakuConfig := WakuConfig{
|
receiverNodeWakuConfig := WakuConfig{
|
||||||
EnableRelay: true,
|
Relay: true,
|
||||||
LogLevel: "DEBUG",
|
LogLevel: "DEBUG",
|
||||||
Discv5Discovery: false,
|
Discv5Discovery: false,
|
||||||
ClusterID: 16,
|
ClusterID: 16,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user