Documentation ¶
Index ¶
- Variables
- type Advert
- func (*Advert) Descriptor() ([]byte, []int)deprecated
- func (x *Advert) GetEvents() []*Event
- func (x *Advert) GetId() string
- func (x *Advert) GetTimestamp() int64
- func (x *Advert) GetTtl() int64
- func (x *Advert) GetType() AdvertType
- func (*Advert) ProtoMessage()
- func (x *Advert) ProtoReflect() protoreflect.Message
- func (x *Advert) Reset()
- func (x *Advert) String() string
- type AdvertType
- type Close
- type Connect
- type Error
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetId() string
- func (x *Event) GetRoute() *Route
- func (x *Event) GetTimestamp() int64
- func (x *Event) GetType() EventType
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- type EventType
- type Node
- func (*Node) Descriptor() ([]byte, []int)deprecated
- func (x *Node) GetAddress() string
- func (x *Node) GetId() string
- func (x *Node) GetMetadata() map[string]string
- func (x *Node) GetNetwork() string
- func (x *Node) GetStatus() *Status
- func (*Node) ProtoMessage()
- func (x *Node) ProtoReflect() protoreflect.Message
- func (x *Node) Reset()
- func (x *Node) String() string
- type Peer
- type Route
- func (*Route) Descriptor() ([]byte, []int)deprecated
- func (x *Route) GetAddress() string
- func (x *Route) GetGateway() string
- func (x *Route) GetLink() string
- func (x *Route) GetMetadata() map[string]string
- func (x *Route) GetMetric() int64
- func (x *Route) GetNetwork() string
- func (x *Route) GetRouter() string
- func (x *Route) GetService() string
- func (*Route) ProtoMessage()
- func (x *Route) ProtoReflect() protoreflect.Message
- func (x *Route) Reset()
- func (x *Route) String() string
- type Status
- type Sync
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AdvertType_name = map[int32]string{ 0: "AdvertAnnounce", 1: "AdvertUpdate", } AdvertType_value = map[string]int32{ "AdvertAnnounce": 0, "AdvertUpdate": 1, } )
Enum value maps for AdvertType.
View Source
var ( EventType_name = map[int32]string{ 0: "Create", 1: "Delete", 2: "Update", } EventType_value = map[string]int32{ "Create": 0, "Delete": 1, "Update": 2, } )
Enum value maps for EventType.
View Source
var File_github_com_micro_go_micro_network_mucp_proto_network_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Advert ¶
type Advert struct { // id of the advertising router Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // type of advertisement Type AdvertType `protobuf:"varint,2,opt,name=type,proto3,enum=go.micro.network.mucp.AdvertType" json:"type,omitempty"` // unix timestamp of the advertisement Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // TTL of the Advert Ttl int64 `protobuf:"varint,4,opt,name=ttl,proto3" json:"ttl,omitempty"` // events is a list of advertised events Events []*Event `protobuf:"bytes,5,rep,name=events,proto3" json:"events,omitempty"` // contains filtered or unexported fields }
Advert is router advertsement streamed by Watch
func (*Advert) Descriptor
deprecated
func (*Advert) GetTimestamp ¶
func (*Advert) GetType ¶
func (x *Advert) GetType() AdvertType
func (*Advert) ProtoMessage ¶
func (*Advert) ProtoMessage()
func (*Advert) ProtoReflect ¶
func (x *Advert) ProtoReflect() protoreflect.Message
type AdvertType ¶
type AdvertType int32
AdvertType defines the type of advert
const ( AdvertType_AdvertAnnounce AdvertType = 0 AdvertType_AdvertUpdate AdvertType = 1 )
func (AdvertType) Descriptor ¶
func (AdvertType) Descriptor() protoreflect.EnumDescriptor
func (AdvertType) Enum ¶
func (x AdvertType) Enum() *AdvertType
func (AdvertType) EnumDescriptor
deprecated
func (AdvertType) EnumDescriptor() ([]byte, []int)
Deprecated: Use AdvertType.Descriptor instead.
func (AdvertType) Number ¶
func (x AdvertType) Number() protoreflect.EnumNumber
func (AdvertType) String ¶
func (x AdvertType) String() string
func (AdvertType) Type ¶
func (AdvertType) Type() protoreflect.EnumType
type Close ¶
type Close struct { // network node Node *Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` // contains filtered or unexported fields }
Close is sent when the node disconnects from the network
func (*Close) Descriptor
deprecated
func (*Close) ProtoMessage ¶
func (*Close) ProtoMessage()
func (*Close) ProtoReflect ¶
func (x *Close) ProtoReflect() protoreflect.Message
type Connect ¶
type Connect struct { // network mode Node *Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` // contains filtered or unexported fields }
Connect is sent when the node connects to the network
func (*Connect) Descriptor
deprecated
func (*Connect) ProtoMessage ¶
func (*Connect) ProtoMessage()
func (*Connect) ProtoReflect ¶
func (x *Connect) ProtoReflect() protoreflect.Message
type Error ¶
type Error struct { Count uint32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
Error tracks network errors
func (*Error) Descriptor
deprecated
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) ProtoReflect ¶
func (x *Error) ProtoReflect() protoreflect.Message
type Event ¶
type Event struct { // the unique event id Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // type of event Type EventType `protobuf:"varint,2,opt,name=type,proto3,enum=go.micro.network.mucp.EventType" json:"type,omitempty"` // unix timestamp of event Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // service route Route *Route `protobuf:"bytes,4,opt,name=route,proto3" json:"route,omitempty"` // contains filtered or unexported fields }
Event is routing table event
func (*Event) Descriptor
deprecated
func (*Event) GetTimestamp ¶
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
type EventType ¶
type EventType int32
EventType defines the type of event
func (EventType) Descriptor ¶
func (EventType) Descriptor() protoreflect.EnumDescriptor
func (EventType) EnumDescriptor
deprecated
func (EventType) Number ¶
func (x EventType) Number() protoreflect.EnumNumber
func (EventType) Type ¶
func (EventType) Type() protoreflect.EnumType
type Node ¶
type Node struct { // node id Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // node address Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` // the network Network string `protobuf:"bytes,3,opt,name=network,proto3" json:"network,omitempty"` // associated metadata Metadata map[string]string `` /* 157-byte string literal not displayed */ // node status Status *Status `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
Node is network node
func (*Node) Descriptor
deprecated
func (*Node) GetAddress ¶
func (*Node) GetMetadata ¶
func (*Node) GetNetwork ¶
func (*Node) ProtoMessage ¶
func (*Node) ProtoMessage()
func (*Node) ProtoReflect ¶
func (x *Node) ProtoReflect() protoreflect.Message
type Peer ¶
type Peer struct { // network node Node *Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` // node peers Peers []*Peer `protobuf:"bytes,2,rep,name=peers,proto3" json:"peers,omitempty"` // contains filtered or unexported fields }
Peer is used to advertise node peers
func (*Peer) Descriptor
deprecated
func (*Peer) ProtoMessage ¶
func (*Peer) ProtoMessage()
func (*Peer) ProtoReflect ¶
func (x *Peer) ProtoReflect() protoreflect.Message
type Route ¶
type Route struct { // service for the route Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` // the address that advertise this route Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` // gateway as the next hop Gateway string `protobuf:"bytes,3,opt,name=gateway,proto3" json:"gateway,omitempty"` // the network for this destination Network string `protobuf:"bytes,4,opt,name=network,proto3" json:"network,omitempty"` // router if the router id Router string `protobuf:"bytes,5,opt,name=router,proto3" json:"router,omitempty"` // the network link Link string `protobuf:"bytes,6,opt,name=link,proto3" json:"link,omitempty"` // the metric / score of this route Metric int64 `protobuf:"varint,7,opt,name=metric,proto3" json:"metric,omitempty"` // metadata for the route Metadata map[string]string `` /* 157-byte string literal not displayed */ // contains filtered or unexported fields }
Route is a service route
func (*Route) Descriptor
deprecated
func (*Route) GetAddress ¶
func (*Route) GetGateway ¶
func (*Route) GetMetadata ¶
func (*Route) GetNetwork ¶
func (*Route) GetService ¶
func (*Route) ProtoMessage ¶
func (*Route) ProtoMessage()
func (*Route) ProtoReflect ¶
func (x *Route) ProtoReflect() protoreflect.Message
type Status ¶
type Status struct { Error *Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
Status is node status
func (*Status) Descriptor
deprecated
func (*Status) ProtoMessage ¶
func (*Status) ProtoMessage()
func (*Status) ProtoReflect ¶
func (x *Status) ProtoReflect() protoreflect.Message
type Sync ¶
type Sync struct { // peer origin Peer *Peer `protobuf:"bytes,1,opt,name=peer,proto3" json:"peer,omitempty"` // node routes Routes []*Route `protobuf:"bytes,2,rep,name=routes,proto3" json:"routes,omitempty"` // contains filtered or unexported fields }
Sync is network sync message
func (*Sync) Descriptor
deprecated
func (*Sync) ProtoMessage ¶
func (*Sync) ProtoMessage()
func (*Sync) ProtoReflect ¶
func (x *Sync) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.