Versions in this module Expand all Collapse all v0 v0.9.0 Apr 11, 2023 Changes in this version + var AdvertType_name = map[int32]string + var AdvertType_value = map[string]int32 + var EventType_name = map[int32]string + var EventType_value = map[string]int32 + func NewRouterEndpoints() []*api.Endpoint + func NewTableEndpoints() []*api.Endpoint + func RegisterRouterHandler(s server.Server, hdlr RouterHandler, opts ...server.HandlerOption) error + func RegisterRouterServer(s *grpc.Server, srv RouterServer) + func RegisterTableHandler(s server.Server, hdlr TableHandler, opts ...server.HandlerOption) error + func RegisterTableServer(s *grpc.Server, srv TableServer) + type Advert struct + Events []*Event + Id string + Timestamp int64 + Ttl int64 + Type AdvertType + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*Advert) Descriptor() ([]byte, []int) + func (*Advert) ProtoMessage() + func (m *Advert) GetEvents() []*Event + func (m *Advert) GetId() string + func (m *Advert) GetTimestamp() int64 + func (m *Advert) GetTtl() int64 + func (m *Advert) GetType() AdvertType + func (m *Advert) Reset() + func (m *Advert) String() string + func (m *Advert) XXX_DiscardUnknown() + func (m *Advert) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Advert) XXX_Merge(src proto.Message) + func (m *Advert) XXX_Size() int + func (m *Advert) XXX_Unmarshal(b []byte) error + type AdvertType int32 + const AdvertType_AdvertAnnounce + const AdvertType_AdvertUpdate + func (AdvertType) EnumDescriptor() ([]byte, []int) + func (x AdvertType) String() string + type CreateResponse struct + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*CreateResponse) Descriptor() ([]byte, []int) + func (*CreateResponse) ProtoMessage() + func (m *CreateResponse) Reset() + func (m *CreateResponse) String() string + func (m *CreateResponse) XXX_DiscardUnknown() + func (m *CreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *CreateResponse) XXX_Merge(src proto.Message) + func (m *CreateResponse) XXX_Size() int + func (m *CreateResponse) XXX_Unmarshal(b []byte) error + type DeleteResponse struct + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*DeleteResponse) Descriptor() ([]byte, []int) + func (*DeleteResponse) ProtoMessage() + func (m *DeleteResponse) Reset() + func (m *DeleteResponse) String() string + func (m *DeleteResponse) XXX_DiscardUnknown() + func (m *DeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *DeleteResponse) XXX_Merge(src proto.Message) + func (m *DeleteResponse) XXX_Size() int + func (m *DeleteResponse) XXX_Unmarshal(b []byte) error + type Event struct + Id string + Route *Route + Timestamp int64 + Type EventType + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*Event) Descriptor() ([]byte, []int) + func (*Event) ProtoMessage() + func (m *Event) GetId() string + func (m *Event) GetRoute() *Route + func (m *Event) GetTimestamp() int64 + func (m *Event) GetType() EventType + func (m *Event) Reset() + func (m *Event) String() string + func (m *Event) XXX_DiscardUnknown() + func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Event) XXX_Merge(src proto.Message) + func (m *Event) XXX_Size() int + func (m *Event) XXX_Unmarshal(b []byte) error + type EventType int32 + const EventType_Create + const EventType_Delete + const EventType_Update + func (EventType) EnumDescriptor() ([]byte, []int) + func (x EventType) String() string + type ListResponse struct + Routes []*Route + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*ListResponse) Descriptor() ([]byte, []int) + func (*ListResponse) ProtoMessage() + func (m *ListResponse) GetRoutes() []*Route + func (m *ListResponse) Reset() + func (m *ListResponse) String() string + func (m *ListResponse) XXX_DiscardUnknown() + func (m *ListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *ListResponse) XXX_Merge(src proto.Message) + func (m *ListResponse) XXX_Size() int + func (m *ListResponse) XXX_Unmarshal(b []byte) error + type LookupRequest struct + Query *Query + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*LookupRequest) Descriptor() ([]byte, []int) + func (*LookupRequest) ProtoMessage() + func (m *LookupRequest) GetQuery() *Query + func (m *LookupRequest) Reset() + func (m *LookupRequest) String() string + func (m *LookupRequest) XXX_DiscardUnknown() + func (m *LookupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *LookupRequest) XXX_Merge(src proto.Message) + func (m *LookupRequest) XXX_Size() int + func (m *LookupRequest) XXX_Unmarshal(b []byte) error + type LookupResponse struct + Routes []*Route + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*LookupResponse) Descriptor() ([]byte, []int) + func (*LookupResponse) ProtoMessage() + func (m *LookupResponse) GetRoutes() []*Route + func (m *LookupResponse) Reset() + func (m *LookupResponse) String() string + func (m *LookupResponse) XXX_DiscardUnknown() + func (m *LookupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *LookupResponse) XXX_Merge(src proto.Message) + func (m *LookupResponse) XXX_Size() int + func (m *LookupResponse) XXX_Unmarshal(b []byte) error + type ProcessResponse struct + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*ProcessResponse) Descriptor() ([]byte, []int) + func (*ProcessResponse) ProtoMessage() + func (m *ProcessResponse) Reset() + func (m *ProcessResponse) String() string + func (m *ProcessResponse) XXX_DiscardUnknown() + func (m *ProcessResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *ProcessResponse) XXX_Merge(src proto.Message) + func (m *ProcessResponse) XXX_Size() int + func (m *ProcessResponse) XXX_Unmarshal(b []byte) error + type Query struct + Gateway string + Network string + Service string + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*Query) Descriptor() ([]byte, []int) + func (*Query) ProtoMessage() + func (m *Query) GetGateway() string + func (m *Query) GetNetwork() string + func (m *Query) GetService() string + func (m *Query) Reset() + func (m *Query) String() string + func (m *Query) XXX_DiscardUnknown() + func (m *Query) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Query) XXX_Merge(src proto.Message) + func (m *Query) XXX_Size() int + func (m *Query) XXX_Unmarshal(b []byte) error + type QueryRequest struct + Query *Query + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*QueryRequest) Descriptor() ([]byte, []int) + func (*QueryRequest) ProtoMessage() + func (m *QueryRequest) GetQuery() *Query + func (m *QueryRequest) Reset() + func (m *QueryRequest) String() string + func (m *QueryRequest) XXX_DiscardUnknown() + func (m *QueryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *QueryRequest) XXX_Merge(src proto.Message) + func (m *QueryRequest) XXX_Size() int + func (m *QueryRequest) XXX_Unmarshal(b []byte) error + type QueryResponse struct + Routes []*Route + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*QueryResponse) Descriptor() ([]byte, []int) + func (*QueryResponse) ProtoMessage() + func (m *QueryResponse) GetRoutes() []*Route + func (m *QueryResponse) Reset() + func (m *QueryResponse) String() string + func (m *QueryResponse) XXX_DiscardUnknown() + func (m *QueryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *QueryResponse) XXX_Merge(src proto.Message) + func (m *QueryResponse) XXX_Size() int + func (m *QueryResponse) XXX_Unmarshal(b []byte) error + type Request struct + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*Request) Descriptor() ([]byte, []int) + func (*Request) ProtoMessage() + func (m *Request) Reset() + func (m *Request) String() string + func (m *Request) XXX_DiscardUnknown() + func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Request) XXX_Merge(src proto.Message) + func (m *Request) XXX_Size() int + func (m *Request) XXX_Unmarshal(b []byte) error + type Response struct + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*Response) Descriptor() ([]byte, []int) + func (*Response) ProtoMessage() + func (m *Response) Reset() + func (m *Response) String() string + func (m *Response) XXX_DiscardUnknown() + func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Response) XXX_Merge(src proto.Message) + func (m *Response) XXX_Size() int + func (m *Response) XXX_Unmarshal(b []byte) error + type Route struct + Address string + Gateway string + Link string + Metric int64 + Network string + Router string + Service string + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*Route) Descriptor() ([]byte, []int) + func (*Route) ProtoMessage() + func (m *Route) GetAddress() string + func (m *Route) GetGateway() string + func (m *Route) GetLink() string + func (m *Route) GetMetric() int64 + func (m *Route) GetNetwork() string + func (m *Route) GetRouter() string + func (m *Route) GetService() string + func (m *Route) Reset() + func (m *Route) String() string + func (m *Route) XXX_DiscardUnknown() + func (m *Route) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Route) XXX_Merge(src proto.Message) + func (m *Route) XXX_Size() int + func (m *Route) XXX_Unmarshal(b []byte) error + type RouterClient interface + Advertise func(ctx context.Context, in *Request, opts ...grpc.CallOption) (Router_AdvertiseClient, error) + Lookup func(ctx context.Context, in *LookupRequest, opts ...grpc.CallOption) (*LookupResponse, error) + Process func(ctx context.Context, in *Advert, opts ...grpc.CallOption) (*ProcessResponse, error) + Watch func(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (Router_WatchClient, error) + func NewRouterClient(cc *grpc.ClientConn) RouterClient + type RouterHandler interface + Advertise func(context.Context, *Request, Router_AdvertiseStream) error + Lookup func(context.Context, *LookupRequest, *LookupResponse) error + Process func(context.Context, *Advert, *ProcessResponse) error + Watch func(context.Context, *WatchRequest, Router_WatchStream) error + type RouterServer interface + Advertise func(*Request, Router_AdvertiseServer) error + Lookup func(context.Context, *LookupRequest) (*LookupResponse, error) + Process func(context.Context, *Advert) (*ProcessResponse, error) + Watch func(*WatchRequest, Router_WatchServer) error + type RouterService interface + Advertise func(ctx context.Context, in *Request, opts ...client.CallOption) (Router_AdvertiseService, error) + Lookup func(ctx context.Context, in *LookupRequest, opts ...client.CallOption) (*LookupResponse, error) + Process func(ctx context.Context, in *Advert, opts ...client.CallOption) (*ProcessResponse, error) + Watch func(ctx context.Context, in *WatchRequest, opts ...client.CallOption) (Router_WatchService, error) + func NewRouterService(name string, c client.Client) RouterService + type Router_AdvertiseClient interface + Recv func() (*Advert, error) + type Router_AdvertiseServer interface + Send func(*Advert) error + type Router_AdvertiseService interface + Close func() error + Context func() context.Context + Recv func() (*Advert, error) + RecvMsg func(interface{}) error + SendMsg func(interface{}) error + type Router_AdvertiseStream interface + Close func() error + Context func() context.Context + RecvMsg func(interface{}) error + Send func(*Advert) error + SendMsg func(interface{}) error + type Router_WatchClient interface + Recv func() (*Event, error) + type Router_WatchServer interface + Send func(*Event) error + type Router_WatchService interface + Close func() error + Context func() context.Context + Recv func() (*Event, error) + RecvMsg func(interface{}) error + SendMsg func(interface{}) error + type Router_WatchStream interface + Close func() error + Context func() context.Context + RecvMsg func(interface{}) error + Send func(*Event) error + SendMsg func(interface{}) error + type TableClient interface + Create func(ctx context.Context, in *Route, opts ...grpc.CallOption) (*CreateResponse, error) + Delete func(ctx context.Context, in *Route, opts ...grpc.CallOption) (*DeleteResponse, error) + List func(ctx context.Context, in *Request, opts ...grpc.CallOption) (*ListResponse, error) + Query func(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) + Update func(ctx context.Context, in *Route, opts ...grpc.CallOption) (*UpdateResponse, error) + func NewTableClient(cc *grpc.ClientConn) TableClient + type TableHandler interface + Create func(context.Context, *Route, *CreateResponse) error + Delete func(context.Context, *Route, *DeleteResponse) error + List func(context.Context, *Request, *ListResponse) error + Query func(context.Context, *QueryRequest, *QueryResponse) error + Update func(context.Context, *Route, *UpdateResponse) error + type TableServer interface + Create func(context.Context, *Route) (*CreateResponse, error) + Delete func(context.Context, *Route) (*DeleteResponse, error) + List func(context.Context, *Request) (*ListResponse, error) + Query func(context.Context, *QueryRequest) (*QueryResponse, error) + Update func(context.Context, *Route) (*UpdateResponse, error) + type TableService interface + Create func(ctx context.Context, in *Route, opts ...client.CallOption) (*CreateResponse, error) + Delete func(ctx context.Context, in *Route, opts ...client.CallOption) (*DeleteResponse, error) + List func(ctx context.Context, in *Request, opts ...client.CallOption) (*ListResponse, error) + Query func(ctx context.Context, in *QueryRequest, opts ...client.CallOption) (*QueryResponse, error) + Update func(ctx context.Context, in *Route, opts ...client.CallOption) (*UpdateResponse, error) + func NewTableService(name string, c client.Client) TableService + type UnimplementedRouterServer struct + func (*UnimplementedRouterServer) Advertise(req *Request, srv Router_AdvertiseServer) error + func (*UnimplementedRouterServer) Lookup(ctx context.Context, req *LookupRequest) (*LookupResponse, error) + func (*UnimplementedRouterServer) Process(ctx context.Context, req *Advert) (*ProcessResponse, error) + func (*UnimplementedRouterServer) Watch(req *WatchRequest, srv Router_WatchServer) error + type UnimplementedTableServer struct + func (*UnimplementedTableServer) Create(ctx context.Context, req *Route) (*CreateResponse, error) + func (*UnimplementedTableServer) Delete(ctx context.Context, req *Route) (*DeleteResponse, error) + func (*UnimplementedTableServer) List(ctx context.Context, req *Request) (*ListResponse, error) + func (*UnimplementedTableServer) Query(ctx context.Context, req *QueryRequest) (*QueryResponse, error) + func (*UnimplementedTableServer) Update(ctx context.Context, req *Route) (*UpdateResponse, error) + type UpdateResponse struct + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*UpdateResponse) Descriptor() ([]byte, []int) + func (*UpdateResponse) ProtoMessage() + func (m *UpdateResponse) Reset() + func (m *UpdateResponse) String() string + func (m *UpdateResponse) XXX_DiscardUnknown() + func (m *UpdateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *UpdateResponse) XXX_Merge(src proto.Message) + func (m *UpdateResponse) XXX_Size() int + func (m *UpdateResponse) XXX_Unmarshal(b []byte) error + type WatchRequest struct + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*WatchRequest) Descriptor() ([]byte, []int) + func (*WatchRequest) ProtoMessage() + func (m *WatchRequest) Reset() + func (m *WatchRequest) String() string + func (m *WatchRequest) XXX_DiscardUnknown() + func (m *WatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *WatchRequest) XXX_Merge(src proto.Message) + func (m *WatchRequest) XXX_Size() int + func (m *WatchRequest) XXX_Unmarshal(b []byte) error