docker: github.com/docker/docker/vendor/github.com/docker/libnetwork/networkdb Index | Files

package networkdb

import "github.com/docker/docker/vendor/github.com/docker/libnetwork/networkdb"

Package networkdb is a generated protocol buffer package.

It is generated from these files:

networkdb/networkdb.proto

It has these top-level messages:

GossipMessage
NodeEvent
NetworkEvent
NetworkEntry
NetworkPushPull
TableEvent
BulkSyncMessage
CompoundMessage

Index

Package Files

broadcast.go cluster.go delegate.go event_delegate.go message.go networkdb.go networkdb.pb.go networkdbdiagnostic.go nodemgmt.go watch.go

Constants

const NodeTable = "NodeTable"

NodeTable represents table event for node join and leave

Variables

var (
    ErrInvalidLengthNetworkdb = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowNetworkdb   = fmt.Errorf("proto: integer overflow")
)
var MessageType_name = map[int32]string{
    0:  "INVALID",
    1:  "NETWORK_EVENT",
    2:  "TABLE_EVENT",
    3:  "PUSH_PULL",
    4:  "BULK_SYNC",
    5:  "COMPOUND",
    6:  "NODE_EVENT",
}
var MessageType_value = map[string]int32{
    "INVALID":       0,
    "NETWORK_EVENT": 1,
    "TABLE_EVENT":   2,
    "PUSH_PULL":     3,
    "BULK_SYNC":     4,
    "COMPOUND":      5,
    "NODE_EVENT":    6,
}
var NetDbPaths2Func = map[string]diagnostic.HTTPHandlerFunc{
    "/join":         dbJoin,
    "/networkpeers": dbPeers,
    "/clusterpeers": dbClusterPeers,
    "/joinnetwork":  dbJoinNetwork,
    "/leavenetwork": dbLeaveNetwork,
    "/createentry":  dbCreateEntry,
    "/updateentry":  dbUpdateEntry,
    "/deleteentry":  dbDeleteEntry,
    "/getentry":     dbGetEntry,
    "/gettable":     dbGetTable,
    "/networkstats": dbNetworkStats,
}

NetDbPaths2Func TODO

var NetworkEvent_Type_name = map[int32]string{
    0:  "INVALID",
    1:  "JOIN",
    2:  "LEAVE",
}
var NetworkEvent_Type_value = map[string]int32{
    "INVALID": 0,
    "JOIN":    1,
    "LEAVE":   2,
}
var NodeEvent_Type_name = map[int32]string{
    0:  "INVALID",
    1:  "JOIN",
    2:  "LEAVE",
}
var NodeEvent_Type_value = map[string]int32{
    "INVALID": 0,
    "JOIN":    1,
    "LEAVE":   2,
}
var TableEvent_Type_name = map[int32]string{
    0:  "INVALID",
    1:  "CREATE",
    2:  "UPDATE",
    3:  "DELETE",
}
var TableEvent_Type_value = map[string]int32{
    "INVALID": 0,
    "CREATE":  1,
    "UPDATE":  2,
    "DELETE":  3,
}

type BulkSyncMessage Uses

type BulkSyncMessage struct {
    // Lamport time when this bulk sync was initiated.
    LTime github_com_hashicorp_serf_serf.LamportTime `protobuf:"varint,1,opt,name=l_time,json=lTime,proto3,customtype=github.com/hashicorp/serf/serf.LamportTime" json:"l_time"`
    // Indicates if this bulksync is a response to a bulk sync
    // request from a peer node.
    Unsolicited bool `protobuf:"varint,2,opt,name=unsolicited,proto3" json:"unsolicited,omitempty"`
    // Name of the node which is producing this bulk sync message.
    NodeName string `protobuf:"bytes,3,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"`
    // List of network names whose table entries are getting
    // bulksynced as part of the bulksync.
    Networks []string `protobuf:"bytes,4,rep,name=networks" json:"networks,omitempty"`
    // Bulksync payload
    Payload []byte `protobuf:"bytes,5,opt,name=payload,proto3" json:"payload,omitempty"`
}

BulkSync message payload definition.

func (*BulkSyncMessage) Descriptor Uses

func (*BulkSyncMessage) Descriptor() ([]byte, []int)

func (*BulkSyncMessage) GetNetworks Uses

func (m *BulkSyncMessage) GetNetworks() []string

func (*BulkSyncMessage) GetNodeName Uses

func (m *BulkSyncMessage) GetNodeName() string

func (*BulkSyncMessage) GetPayload Uses

func (m *BulkSyncMessage) GetPayload() []byte

func (*BulkSyncMessage) GetUnsolicited Uses

func (m *BulkSyncMessage) GetUnsolicited() bool

func (*BulkSyncMessage) GoString Uses

func (this *BulkSyncMessage) GoString() string

func (*BulkSyncMessage) Marshal Uses

func (m *BulkSyncMessage) Marshal() (dAtA []byte, err error)

func (*BulkSyncMessage) MarshalTo Uses

func (m *BulkSyncMessage) MarshalTo(dAtA []byte) (int, error)

func (*BulkSyncMessage) ProtoMessage Uses

func (*BulkSyncMessage) ProtoMessage()

func (*BulkSyncMessage) Reset Uses

func (m *BulkSyncMessage) Reset()

func (*BulkSyncMessage) Size Uses

func (m *BulkSyncMessage) Size() (n int)

func (*BulkSyncMessage) String Uses

func (this *BulkSyncMessage) String() string

func (*BulkSyncMessage) Unmarshal Uses

func (m *BulkSyncMessage) Unmarshal(dAtA []byte) error

type CompoundMessage Uses

type CompoundMessage struct {
    // A list of simple messages.
    Messages []*CompoundMessage_SimpleMessage `protobuf:"bytes,1,rep,name=messages" json:"messages,omitempty"`
}

Compound message payload definition.

func (*CompoundMessage) Descriptor Uses

func (*CompoundMessage) Descriptor() ([]byte, []int)

func (*CompoundMessage) GetMessages Uses

func (m *CompoundMessage) GetMessages() []*CompoundMessage_SimpleMessage

func (*CompoundMessage) GoString Uses

func (this *CompoundMessage) GoString() string

func (*CompoundMessage) Marshal Uses

func (m *CompoundMessage) Marshal() (dAtA []byte, err error)

func (*CompoundMessage) MarshalTo Uses

func (m *CompoundMessage) MarshalTo(dAtA []byte) (int, error)

func (*CompoundMessage) ProtoMessage Uses

func (*CompoundMessage) ProtoMessage()

func (*CompoundMessage) Reset Uses

func (m *CompoundMessage) Reset()

func (*CompoundMessage) Size Uses

func (m *CompoundMessage) Size() (n int)

func (*CompoundMessage) String Uses

func (this *CompoundMessage) String() string

func (*CompoundMessage) Unmarshal Uses

func (m *CompoundMessage) Unmarshal(dAtA []byte) error

type CompoundMessage_SimpleMessage Uses

type CompoundMessage_SimpleMessage struct {
    // Bytestring payload of a message constructed using
    // other message type definitions.
    Payload []byte `protobuf:"bytes,1,opt,name=Payload,proto3" json:"Payload,omitempty"`
}

func (*CompoundMessage_SimpleMessage) Descriptor Uses

func (*CompoundMessage_SimpleMessage) Descriptor() ([]byte, []int)

func (*CompoundMessage_SimpleMessage) GetPayload Uses

func (m *CompoundMessage_SimpleMessage) GetPayload() []byte

func (*CompoundMessage_SimpleMessage) GoString Uses

func (this *CompoundMessage_SimpleMessage) GoString() string

func (*CompoundMessage_SimpleMessage) Marshal Uses

func (m *CompoundMessage_SimpleMessage) Marshal() (dAtA []byte, err error)

func (*CompoundMessage_SimpleMessage) MarshalTo Uses

func (m *CompoundMessage_SimpleMessage) MarshalTo(dAtA []byte) (int, error)

func (*CompoundMessage_SimpleMessage) ProtoMessage Uses

func (*CompoundMessage_SimpleMessage) ProtoMessage()

func (*CompoundMessage_SimpleMessage) Reset Uses

func (m *CompoundMessage_SimpleMessage) Reset()

func (*CompoundMessage_SimpleMessage) Size Uses

func (m *CompoundMessage_SimpleMessage) Size() (n int)

func (*CompoundMessage_SimpleMessage) String Uses

func (this *CompoundMessage_SimpleMessage) String() string

func (*CompoundMessage_SimpleMessage) Unmarshal Uses

func (m *CompoundMessage_SimpleMessage) Unmarshal(dAtA []byte) error

type Config Uses

type Config struct {
    // NodeID is the node unique identifier of the node when is part of the cluster
    NodeID string

    // Hostname is the node hostname.
    Hostname string

    // BindAddr is the IP on which networkdb listens. It can be
    // 0.0.0.0 to listen on all addresses on the host.
    BindAddr string

    // AdvertiseAddr is the node's IP address that we advertise for
    // cluster communication.
    AdvertiseAddr string

    // BindPort is the local node's port to which we bind to for
    // cluster communication.
    BindPort int

    // Keys to be added to the Keyring of the memberlist. Key at index
    // 0 is the primary key
    Keys [][]byte

    // PacketBufferSize is the maximum number of bytes that memberlist will
    // put in a packet (this will be for UDP packets by default with a NetTransport).
    // A safe value for this is typically 1400 bytes (which is the default). However,
    // depending on your network's MTU (Maximum Transmission Unit) you may
    // be able to increase this to get more content into each gossip packet.
    PacketBufferSize int

    // StatsPrintPeriod the period to use to print queue stats
    // Default is 5min
    StatsPrintPeriod time.Duration

    // HealthPrintPeriod the period to use to print the health score
    // Default is 1min
    HealthPrintPeriod time.Duration
    // contains filtered or unexported fields
}

Config represents the configuration of the networkdb instance and can be passed by the caller.

func DefaultConfig Uses

func DefaultConfig() *Config

DefaultConfig returns a NetworkDB config with default values

type CreateEvent Uses

type CreateEvent event

CreateEvent generates a table entry create event to the watchers

type DeleteEvent Uses

type DeleteEvent event

DeleteEvent generates a table entry delete event to the watchers

type GossipMessage Uses

type GossipMessage struct {
    Type MessageType `protobuf:"varint,1,opt,name=type,proto3,enum=networkdb.MessageType" json:"type,omitempty"`
    Data []byte      `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
}

GossipMessage is a basic message header used by all messages types.

func (*GossipMessage) Descriptor Uses

func (*GossipMessage) Descriptor() ([]byte, []int)

func (*GossipMessage) GetData Uses

func (m *GossipMessage) GetData() []byte

func (*GossipMessage) GetType Uses

func (m *GossipMessage) GetType() MessageType

func (*GossipMessage) GoString Uses

func (this *GossipMessage) GoString() string

func (*GossipMessage) Marshal Uses

func (m *GossipMessage) Marshal() (dAtA []byte, err error)

func (*GossipMessage) MarshalTo Uses

func (m *GossipMessage) MarshalTo(dAtA []byte) (int, error)

func (*GossipMessage) ProtoMessage Uses

func (*GossipMessage) ProtoMessage()

func (*GossipMessage) Reset Uses

func (m *GossipMessage) Reset()

func (*GossipMessage) Size Uses

func (m *GossipMessage) Size() (n int)

func (*GossipMessage) String Uses

func (this *GossipMessage) String() string

func (*GossipMessage) Unmarshal Uses

func (m *GossipMessage) Unmarshal(dAtA []byte) error

type MessageType Uses

type MessageType int32

MessageType enum defines all the core message types that networkdb uses to communicate to peers.

const (
    MessageTypeInvalid MessageType = 0
    // NetworkEvent message type is used to communicate network
    // attachments on the node.
    MessageTypeNetworkEvent MessageType = 1
    // TableEvent message type is used to communicate any table
    // CRUD event that happened on the node.
    MessageTypeTableEvent MessageType = 2
    // PushPull message type is used to syncup all network
    // attachments on a peer node either during startup of this
    // node or with a random peer node periodically thereafter.
    MessageTypePushPull MessageType = 3
    // BulkSync message is used to bulksync the whole networkdb
    // state with a peer node during startup of this node or with
    // a random peer node periodically thereafter.
    MessageTypeBulkSync MessageType = 4
    // Compound message type is used to form a compound message
    // which is a pack of many message of above types, packed into
    // a single compound message.
    MessageTypeCompound MessageType = 5
    // NodeEvent message type is used to communicate node
    // join/leave events in the cluster
    MessageTypeNodeEvent MessageType = 6
)

func (MessageType) EnumDescriptor Uses

func (MessageType) EnumDescriptor() ([]byte, []int)

func (MessageType) String Uses

func (x MessageType) String() string

type NetworkDB Uses

type NetworkDB struct {
    sync.RWMutex
    // contains filtered or unexported fields
}

NetworkDB instance drives the networkdb cluster and acts the broker for cluster-scoped and network-scoped gossip and watches.

func New Uses

func New(c *Config) (*NetworkDB, error)

New creates a new instance of NetworkDB using the Config passed by the caller.

func (*NetworkDB) Close Uses

func (nDB *NetworkDB) Close()

Close destroys this NetworkDB instance by leave the cluster, stopping timers, canceling goroutines etc.

func (*NetworkDB) ClusterPeers Uses

func (nDB *NetworkDB) ClusterPeers() []PeerInfo

ClusterPeers returns all the gossip cluster peers.

func (*NetworkDB) CreateEntry Uses

func (nDB *NetworkDB) CreateEntry(tname, nid, key string, value []byte) error

CreateEntry creates a table entry in NetworkDB for given (network, table, key) tuple and if the NetworkDB is part of the cluster propagates this event to the cluster. It is an error to create an entry for the same tuple for which there is already an existing entry unless the current entry is deleting state.

func (*NetworkDB) DeleteEntry Uses

func (nDB *NetworkDB) DeleteEntry(tname, nid, key string) error

DeleteEntry deletes a table entry in NetworkDB for given (network, table, key) tuple and if the NetworkDB is part of the cluster propagates this event to the cluster.

func (*NetworkDB) GetEntry Uses

func (nDB *NetworkDB) GetEntry(tname, nid, key string) ([]byte, error)

GetEntry retrieves the value of a table entry in a given (network, table, key) tuple

func (*NetworkDB) GetTableByNetwork Uses

func (nDB *NetworkDB) GetTableByNetwork(tname, nid string) map[string]*TableElem

GetTableByNetwork walks the networkdb by the give table and network id and returns a map of keys and values

func (*NetworkDB) Join Uses

func (nDB *NetworkDB) Join(members []string) error

Join joins this NetworkDB instance with a list of peer NetworkDB instances passed by the caller in the form of addr:port

func (*NetworkDB) JoinNetwork Uses

func (nDB *NetworkDB) JoinNetwork(nid string) error

JoinNetwork joins this node to a given network and propagates this event across the cluster. This triggers this node joining the sub-cluster of this network and participates in the network-scoped gossip and bulk sync for this network.

func (*NetworkDB) LeaveNetwork Uses

func (nDB *NetworkDB) LeaveNetwork(nid string) error

LeaveNetwork leaves this node from a given network and propagates this event across the cluster. This triggers this node leaving the sub-cluster of this network and as a result will no longer participate in the network-scoped gossip and bulk sync for this network. Also remove all the table entries for this network from networkdb

func (*NetworkDB) Peers Uses

func (nDB *NetworkDB) Peers(nid string) []PeerInfo

Peers returns the gossip peers for a given network.

func (*NetworkDB) RemoveKey Uses

func (nDB *NetworkDB) RemoveKey(key []byte)

RemoveKey removes a key from the key ring. The key being removed can't be the primary key

func (*NetworkDB) SetKey Uses

func (nDB *NetworkDB) SetKey(key []byte)

SetKey adds a new key to the key ring

func (*NetworkDB) SetPrimaryKey Uses

func (nDB *NetworkDB) SetPrimaryKey(key []byte)

SetPrimaryKey sets the given key as the primary key. This should have been added apriori through SetKey

func (*NetworkDB) UpdateEntry Uses

func (nDB *NetworkDB) UpdateEntry(tname, nid, key string, value []byte) error

UpdateEntry updates a table entry in NetworkDB for given (network, table, key) tuple and if the NetworkDB is part of the cluster propagates this event to the cluster. It is an error to update a non-existent entry.

func (*NetworkDB) WalkTable Uses

func (nDB *NetworkDB) WalkTable(tname string, fn func(string, string, []byte, bool) bool) error

WalkTable walks a single table in NetworkDB and invokes the passed function for each entry in the table passing the network, key, value. The walk stops if the passed function returns a true.

func (*NetworkDB) Watch Uses

func (nDB *NetworkDB) Watch(tname, nid, key string) (*events.Channel, func())

Watch creates a watcher with filters for a particular table or network or key or any combination of the tuple. If any of the filter is an empty string it acts as a wildcard for that field. Watch returns a channel of events, where the events will be sent.

type NetworkEntry Uses

type NetworkEntry struct {
    // ID of the network
    NetworkID string `protobuf:"bytes,1,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"`
    // Latest lamport time of the network attachment when this
    // network event was recorded.
    LTime github_com_hashicorp_serf_serf.LamportTime `protobuf:"varint,2,opt,name=l_time,json=lTime,proto3,customtype=github.com/hashicorp/serf/serf.LamportTime" json:"l_time"`
    // Source node name where this network attachment happened.
    NodeName string `protobuf:"bytes,3,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"`
    // Indicates if a leave from this network is in progress.
    Leaving bool `protobuf:"varint,4,opt,name=leaving,proto3" json:"leaving,omitempty"`
}

NetworkEntry for push pull of networks.

func (*NetworkEntry) Descriptor Uses

func (*NetworkEntry) Descriptor() ([]byte, []int)

func (*NetworkEntry) GetLeaving Uses

func (m *NetworkEntry) GetLeaving() bool

func (*NetworkEntry) GetNetworkID Uses

func (m *NetworkEntry) GetNetworkID() string

func (*NetworkEntry) GetNodeName Uses

func (m *NetworkEntry) GetNodeName() string

func (*NetworkEntry) GoString Uses

func (this *NetworkEntry) GoString() string

func (*NetworkEntry) Marshal Uses

func (m *NetworkEntry) Marshal() (dAtA []byte, err error)

func (*NetworkEntry) MarshalTo Uses

func (m *NetworkEntry) MarshalTo(dAtA []byte) (int, error)

func (*NetworkEntry) ProtoMessage Uses

func (*NetworkEntry) ProtoMessage()

func (*NetworkEntry) Reset Uses

func (m *NetworkEntry) Reset()

func (*NetworkEntry) Size Uses

func (m *NetworkEntry) Size() (n int)

func (*NetworkEntry) String Uses

func (this *NetworkEntry) String() string

func (*NetworkEntry) Unmarshal Uses

func (m *NetworkEntry) Unmarshal(dAtA []byte) error

type NetworkEvent Uses

type NetworkEvent struct {
    Type NetworkEvent_Type `protobuf:"varint,1,opt,name=type,proto3,enum=networkdb.NetworkEvent_Type" json:"type,omitempty"`
    // Lamport time using a network lamport clock indicating the
    // time this event was generated on the node where it was
    // generated.
    LTime github_com_hashicorp_serf_serf.LamportTime `protobuf:"varint,2,opt,name=l_time,json=lTime,proto3,customtype=github.com/hashicorp/serf/serf.LamportTime" json:"l_time"`
    // Source node name.
    NodeName string `protobuf:"bytes,3,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"`
    // ID of the network for which the event is generated.
    NetworkID string `protobuf:"bytes,4,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"`
}

NetworkEvent message payload definition.

func (*NetworkEvent) Descriptor Uses

func (*NetworkEvent) Descriptor() ([]byte, []int)

func (*NetworkEvent) GetNetworkID Uses

func (m *NetworkEvent) GetNetworkID() string

func (*NetworkEvent) GetNodeName Uses

func (m *NetworkEvent) GetNodeName() string

func (*NetworkEvent) GetType Uses

func (m *NetworkEvent) GetType() NetworkEvent_Type

func (*NetworkEvent) GoString Uses

func (this *NetworkEvent) GoString() string

func (*NetworkEvent) Marshal Uses

func (m *NetworkEvent) Marshal() (dAtA []byte, err error)

func (*NetworkEvent) MarshalTo Uses

func (m *NetworkEvent) MarshalTo(dAtA []byte) (int, error)

func (*NetworkEvent) ProtoMessage Uses

func (*NetworkEvent) ProtoMessage()

func (*NetworkEvent) Reset Uses

func (m *NetworkEvent) Reset()

func (*NetworkEvent) Size Uses

func (m *NetworkEvent) Size() (n int)

func (*NetworkEvent) String Uses

func (this *NetworkEvent) String() string

func (*NetworkEvent) Unmarshal Uses

func (m *NetworkEvent) Unmarshal(dAtA []byte) error

type NetworkEvent_Type Uses

type NetworkEvent_Type int32
const (
    NetworkEventTypeInvalid NetworkEvent_Type = 0
    // Join event is generated when this node joins a network.
    NetworkEventTypeJoin NetworkEvent_Type = 1
    // Leave event is generated when this node leaves a network.
    NetworkEventTypeLeave NetworkEvent_Type = 2
)

func (NetworkEvent_Type) EnumDescriptor Uses

func (NetworkEvent_Type) EnumDescriptor() ([]byte, []int)

func (NetworkEvent_Type) String Uses

func (x NetworkEvent_Type) String() string

type NetworkPushPull Uses

type NetworkPushPull struct {
    // Lamport time when this push pull was initiated.
    LTime    github_com_hashicorp_serf_serf.LamportTime `protobuf:"varint,1,opt,name=l_time,json=lTime,proto3,customtype=github.com/hashicorp/serf/serf.LamportTime" json:"l_time"`
    Networks []*NetworkEntry                            `protobuf:"bytes,2,rep,name=networks" json:"networks,omitempty"`
    // Name of the node sending this push pull payload.
    NodeName string `protobuf:"bytes,3,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"`
}

NetworkPushpull message payload definition.

func (*NetworkPushPull) Descriptor Uses

func (*NetworkPushPull) Descriptor() ([]byte, []int)

func (*NetworkPushPull) GetNetworks Uses

func (m *NetworkPushPull) GetNetworks() []*NetworkEntry

func (*NetworkPushPull) GetNodeName Uses

func (m *NetworkPushPull) GetNodeName() string

func (*NetworkPushPull) GoString Uses

func (this *NetworkPushPull) GoString() string

func (*NetworkPushPull) Marshal Uses

func (m *NetworkPushPull) Marshal() (dAtA []byte, err error)

func (*NetworkPushPull) MarshalTo Uses

func (m *NetworkPushPull) MarshalTo(dAtA []byte) (int, error)

func (*NetworkPushPull) ProtoMessage Uses

func (*NetworkPushPull) ProtoMessage()

func (*NetworkPushPull) Reset Uses

func (m *NetworkPushPull) Reset()

func (*NetworkPushPull) Size Uses

func (m *NetworkPushPull) Size() (n int)

func (*NetworkPushPull) String Uses

func (this *NetworkPushPull) String() string

func (*NetworkPushPull) Unmarshal Uses

func (m *NetworkPushPull) Unmarshal(dAtA []byte) error

type NodeAddr Uses

type NodeAddr struct {
    Addr net.IP
}

NodeAddr represents the value carried for node event in NodeTable

type NodeEvent Uses

type NodeEvent struct {
    Type NodeEvent_Type `protobuf:"varint,1,opt,name=type,proto3,enum=networkdb.NodeEvent_Type" json:"type,omitempty"`
    // Lamport time using a network lamport clock indicating the
    // time this event was generated on the node where it was
    // generated.
    LTime github_com_hashicorp_serf_serf.LamportTime `protobuf:"varint,2,opt,name=l_time,json=lTime,proto3,customtype=github.com/hashicorp/serf/serf.LamportTime" json:"l_time"`
    // Source node name.
    NodeName string `protobuf:"bytes,3,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"`
}

NodeEvent message payload definition.

func (*NodeEvent) Descriptor Uses

func (*NodeEvent) Descriptor() ([]byte, []int)

func (*NodeEvent) GetNodeName Uses

func (m *NodeEvent) GetNodeName() string

func (*NodeEvent) GetType Uses

func (m *NodeEvent) GetType() NodeEvent_Type

func (*NodeEvent) GoString Uses

func (this *NodeEvent) GoString() string

func (*NodeEvent) Marshal Uses

func (m *NodeEvent) Marshal() (dAtA []byte, err error)

func (*NodeEvent) MarshalTo Uses

func (m *NodeEvent) MarshalTo(dAtA []byte) (int, error)

func (*NodeEvent) ProtoMessage Uses

func (*NodeEvent) ProtoMessage()

func (*NodeEvent) Reset Uses

func (m *NodeEvent) Reset()

func (*NodeEvent) Size Uses

func (m *NodeEvent) Size() (n int)

func (*NodeEvent) String Uses

func (this *NodeEvent) String() string

func (*NodeEvent) Unmarshal Uses

func (m *NodeEvent) Unmarshal(dAtA []byte) error

type NodeEvent_Type Uses

type NodeEvent_Type int32
const (
    NodeEventTypeInvalid NodeEvent_Type = 0
    // Join event is generated when this node joins the cluster.
    NodeEventTypeJoin NodeEvent_Type = 1
    // Leave event is generated when this node leaves the cluster.
    NodeEventTypeLeave NodeEvent_Type = 2
)

func (NodeEvent_Type) EnumDescriptor Uses

func (NodeEvent_Type) EnumDescriptor() ([]byte, []int)

func (NodeEvent_Type) String Uses

func (x NodeEvent_Type) String() string

type PeerClusterInfo Uses

type PeerClusterInfo struct {
    PeerInfo
}

PeerClusterInfo represents the peer (gossip cluster) nodes

type PeerInfo Uses

type PeerInfo struct {
    Name string
    IP   string
}

PeerInfo represents the peer (gossip cluster) nodes of a network

type TableElem Uses

type TableElem struct {
    Value []byte
    // contains filtered or unexported fields
}

TableElem elem

type TableEvent Uses

type TableEvent struct {
    Type TableEvent_Type `protobuf:"varint,1,opt,name=type,proto3,enum=networkdb.TableEvent_Type" json:"type,omitempty"`
    // Lamport time when this event was generated.
    LTime github_com_hashicorp_serf_serf.LamportTime `protobuf:"varint,2,opt,name=l_time,json=lTime,proto3,customtype=github.com/hashicorp/serf/serf.LamportTime" json:"l_time"`
    // Node name where this event originated.
    NodeName string `protobuf:"bytes,3,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"`
    // ID of the network to which this table entry belongs.
    NetworkID string `protobuf:"bytes,4,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"`
    // Name of the table to which this table entry belongs.
    TableName string `protobuf:"bytes,5,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"`
    // Entry key.
    Key string `protobuf:"bytes,6,opt,name=key,proto3" json:"key,omitempty"`
    // Entry value.
    Value []byte `protobuf:"bytes,7,opt,name=value,proto3" json:"value,omitempty"`
    // Residual reap time for the entry before getting deleted in seconds
    ResidualReapTime int32 `protobuf:"varint,8,opt,name=residual_reap_time,json=residualReapTime,proto3" json:"residual_reap_time,omitempty"`
}

TableEvent message payload definition.

func (*TableEvent) Descriptor Uses

func (*TableEvent) Descriptor() ([]byte, []int)

func (*TableEvent) GetKey Uses

func (m *TableEvent) GetKey() string

func (*TableEvent) GetNetworkID Uses

func (m *TableEvent) GetNetworkID() string

func (*TableEvent) GetNodeName Uses

func (m *TableEvent) GetNodeName() string

func (*TableEvent) GetResidualReapTime Uses

func (m *TableEvent) GetResidualReapTime() int32

func (*TableEvent) GetTableName Uses

func (m *TableEvent) GetTableName() string

func (*TableEvent) GetType Uses

func (m *TableEvent) GetType() TableEvent_Type

func (*TableEvent) GetValue Uses

func (m *TableEvent) GetValue() []byte

func (*TableEvent) GoString Uses

func (this *TableEvent) GoString() string

func (*TableEvent) Marshal Uses

func (m *TableEvent) Marshal() (dAtA []byte, err error)

func (*TableEvent) MarshalTo Uses

func (m *TableEvent) MarshalTo(dAtA []byte) (int, error)

func (*TableEvent) ProtoMessage Uses

func (*TableEvent) ProtoMessage()

func (*TableEvent) Reset Uses

func (m *TableEvent) Reset()

func (*TableEvent) Size Uses

func (m *TableEvent) Size() (n int)

func (*TableEvent) String Uses

func (this *TableEvent) String() string

func (*TableEvent) Unmarshal Uses

func (m *TableEvent) Unmarshal(dAtA []byte) error

type TableEvent_Type Uses

type TableEvent_Type int32
const (
    TableEventTypeInvalid TableEvent_Type = 0
    // Create signifies that this table entry was just
    // created.
    TableEventTypeCreate TableEvent_Type = 1
    // Update signifies that this table entry was just
    // updated.
    TableEventTypeUpdate TableEvent_Type = 2
    // Delete signifies that this table entry was just
    // updated.
    TableEventTypeDelete TableEvent_Type = 3
)

func (TableEvent_Type) EnumDescriptor Uses

func (TableEvent_Type) EnumDescriptor() ([]byte, []int)

func (TableEvent_Type) String Uses

func (x TableEvent_Type) String() string

type UpdateEvent Uses

type UpdateEvent event

UpdateEvent generates a table entry update event to the watchers

Package networkdb imports 31 packages (graph). Updated 2020-05-01. Refresh now. Tools for package owners.