Documentation ¶
Index ¶
- Variables
- 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
- func (*Advert) Descriptor() ([]byte, []int)
- 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) Marshal() (dAtA []byte, err error)
- func (m *Advert) MarshalTo(dAtA []byte) (int, error)
- func (m *Advert) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Advert) ProtoMessage()
- func (m *Advert) Reset()
- func (m *Advert) Size() (n int)
- func (m *Advert) String() string
- func (m *Advert) Unmarshal(dAtA []byte) error
- 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
- type CreateResponse
- func (*CreateResponse) Descriptor() ([]byte, []int)
- func (m *CreateResponse) Marshal() (dAtA []byte, err error)
- func (m *CreateResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *CreateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CreateResponse) ProtoMessage()
- func (m *CreateResponse) Reset()
- func (m *CreateResponse) Size() (n int)
- func (m *CreateResponse) String() string
- func (m *CreateResponse) Unmarshal(dAtA []byte) error
- 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
- func (*DeleteResponse) Descriptor() ([]byte, []int)
- func (m *DeleteResponse) Marshal() (dAtA []byte, err error)
- func (m *DeleteResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *DeleteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*DeleteResponse) ProtoMessage()
- func (m *DeleteResponse) Reset()
- func (m *DeleteResponse) Size() (n int)
- func (m *DeleteResponse) String() string
- func (m *DeleteResponse) Unmarshal(dAtA []byte) error
- 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
- func (*Event) Descriptor() ([]byte, []int)
- func (m *Event) GetId() string
- func (m *Event) GetRoute() *Route
- func (m *Event) GetTimestamp() int64
- func (m *Event) GetType() EventType
- func (m *Event) Marshal() (dAtA []byte, err error)
- func (m *Event) MarshalTo(dAtA []byte) (int, error)
- func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Event) ProtoMessage()
- func (m *Event) Reset()
- func (m *Event) Size() (n int)
- func (m *Event) String() string
- func (m *Event) Unmarshal(dAtA []byte) error
- 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
- type ListResponse
- func (*ListResponse) Descriptor() ([]byte, []int)
- func (m *ListResponse) GetRoutes() []*Route
- func (m *ListResponse) Marshal() (dAtA []byte, err error)
- func (m *ListResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *ListResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ListResponse) ProtoMessage()
- func (m *ListResponse) Reset()
- func (m *ListResponse) Size() (n int)
- func (m *ListResponse) String() string
- func (m *ListResponse) Unmarshal(dAtA []byte) error
- 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
- func (*LookupRequest) Descriptor() ([]byte, []int)
- func (m *LookupRequest) GetQuery() *Query
- func (m *LookupRequest) Marshal() (dAtA []byte, err error)
- func (m *LookupRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *LookupRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LookupRequest) ProtoMessage()
- func (m *LookupRequest) Reset()
- func (m *LookupRequest) Size() (n int)
- func (m *LookupRequest) String() string
- func (m *LookupRequest) Unmarshal(dAtA []byte) error
- 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
- func (*LookupResponse) Descriptor() ([]byte, []int)
- func (m *LookupResponse) GetRoutes() []*Route
- func (m *LookupResponse) Marshal() (dAtA []byte, err error)
- func (m *LookupResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *LookupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LookupResponse) ProtoMessage()
- func (m *LookupResponse) Reset()
- func (m *LookupResponse) Size() (n int)
- func (m *LookupResponse) String() string
- func (m *LookupResponse) Unmarshal(dAtA []byte) error
- 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
- func (*ProcessResponse) Descriptor() ([]byte, []int)
- func (m *ProcessResponse) Marshal() (dAtA []byte, err error)
- func (m *ProcessResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *ProcessResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ProcessResponse) ProtoMessage()
- func (m *ProcessResponse) Reset()
- func (m *ProcessResponse) Size() (n int)
- func (m *ProcessResponse) String() string
- func (m *ProcessResponse) Unmarshal(dAtA []byte) error
- 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
- func (*Query) Descriptor() ([]byte, []int)
- func (m *Query) GetGateway() string
- func (m *Query) GetNetwork() string
- func (m *Query) GetService() string
- func (m *Query) Marshal() (dAtA []byte, err error)
- func (m *Query) MarshalTo(dAtA []byte) (int, error)
- func (m *Query) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Query) ProtoMessage()
- func (m *Query) Reset()
- func (m *Query) Size() (n int)
- func (m *Query) String() string
- func (m *Query) Unmarshal(dAtA []byte) error
- 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
- func (*QueryRequest) Descriptor() ([]byte, []int)
- func (m *QueryRequest) GetQuery() *Query
- func (m *QueryRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryRequest) ProtoMessage()
- func (m *QueryRequest) Reset()
- func (m *QueryRequest) Size() (n int)
- func (m *QueryRequest) String() string
- func (m *QueryRequest) Unmarshal(dAtA []byte) error
- 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
- func (*QueryResponse) Descriptor() ([]byte, []int)
- func (m *QueryResponse) GetRoutes() []*Route
- func (m *QueryResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryResponse) ProtoMessage()
- func (m *QueryResponse) Reset()
- func (m *QueryResponse) Size() (n int)
- func (m *QueryResponse) String() string
- func (m *QueryResponse) Unmarshal(dAtA []byte) error
- 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
- func (*Request) Descriptor() ([]byte, []int)
- func (m *Request) Marshal() (dAtA []byte, err error)
- func (m *Request) MarshalTo(dAtA []byte) (int, error)
- func (m *Request) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Request) ProtoMessage()
- func (m *Request) Reset()
- func (m *Request) Size() (n int)
- func (m *Request) String() string
- func (m *Request) Unmarshal(dAtA []byte) error
- 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
- func (*Response) Descriptor() ([]byte, []int)
- func (m *Response) Marshal() (dAtA []byte, err error)
- func (m *Response) MarshalTo(dAtA []byte) (int, error)
- func (m *Response) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Response) ProtoMessage()
- func (m *Response) Reset()
- func (m *Response) Size() (n int)
- func (m *Response) String() string
- func (m *Response) Unmarshal(dAtA []byte) error
- 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
- func (*Route) Descriptor() ([]byte, []int)
- 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) Marshal() (dAtA []byte, err error)
- func (m *Route) MarshalTo(dAtA []byte) (int, error)
- func (m *Route) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Route) ProtoMessage()
- func (m *Route) Reset()
- func (m *Route) Size() (n int)
- func (m *Route) String() string
- func (m *Route) Unmarshal(dAtA []byte) error
- 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
- type RouterHandler
- type RouterServer
- type RouterService
- type Router_AdvertiseClient
- type Router_AdvertiseServer
- type Router_AdvertiseService
- type Router_AdvertiseStream
- type Router_WatchClient
- type Router_WatchServer
- type Router_WatchService
- type Router_WatchStream
- type TableClient
- type TableHandler
- type TableServer
- type TableService
- type UnimplementedRouterServer
- 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
- 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
- func (*UpdateResponse) Descriptor() ([]byte, []int)
- func (m *UpdateResponse) Marshal() (dAtA []byte, err error)
- func (m *UpdateResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *UpdateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*UpdateResponse) ProtoMessage()
- func (m *UpdateResponse) Reset()
- func (m *UpdateResponse) Size() (n int)
- func (m *UpdateResponse) String() string
- func (m *UpdateResponse) Unmarshal(dAtA []byte) error
- 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
- func (*WatchRequest) Descriptor() ([]byte, []int)
- func (m *WatchRequest) Marshal() (dAtA []byte, err error)
- func (m *WatchRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *WatchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*WatchRequest) ProtoMessage()
- func (m *WatchRequest) Reset()
- func (m *WatchRequest) Size() (n int)
- func (m *WatchRequest) String() string
- func (m *WatchRequest) Unmarshal(dAtA []byte) error
- 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
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthRouter = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowRouter = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupRouter = fmt.Errorf("proto: unexpected end of group") )
var AdvertType_name = map[int32]string{
0: "AdvertAnnounce",
1: "AdvertUpdate",
}
var AdvertType_value = map[string]int32{
"AdvertAnnounce": 0,
"AdvertUpdate": 1,
}
var EventType_name = map[int32]string{
0: "Create",
1: "Delete",
2: "Update",
}
var EventType_value = map[string]int32{
"Create": 0,
"Delete": 1,
"Update": 2,
}
Functions ¶
func NewRouterEndpoints ¶
Api Endpoints for Router service
func RegisterRouterHandler ¶
func RegisterRouterHandler(s server.Server, hdlr RouterHandler, opts ...server.HandlerOption) error
func RegisterRouterServer ¶
func RegisterRouterServer(s *grpc.Server, srv RouterServer)
func RegisterTableHandler ¶
func RegisterTableHandler(s server.Server, hdlr TableHandler, opts ...server.HandlerOption) error
func RegisterTableServer ¶
func RegisterTableServer(s *grpc.Server, srv TableServer)
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=router.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"` }
Advert is router advertsement streamed by Watch
func (*Advert) Descriptor ¶
func (*Advert) GetTimestamp ¶
func (*Advert) GetType ¶
func (m *Advert) GetType() AdvertType
func (*Advert) MarshalToSizedBuffer ¶
func (*Advert) ProtoMessage ¶
func (*Advert) ProtoMessage()
func (*Advert) XXX_DiscardUnknown ¶
func (m *Advert) XXX_DiscardUnknown()
func (*Advert) XXX_Marshal ¶
func (*Advert) XXX_Unmarshal ¶
type AdvertType ¶
type AdvertType int32
AdvertType defines the type of advert
const ( AdvertType_AdvertAnnounce AdvertType = 0 AdvertType_AdvertUpdate AdvertType = 1 )
func (AdvertType) EnumDescriptor ¶
func (AdvertType) EnumDescriptor() ([]byte, []int)
func (AdvertType) String ¶
func (x AdvertType) String() string
type CreateResponse ¶
type CreateResponse struct { }
CreateResponse is returned by Create
func (*CreateResponse) Descriptor ¶
func (*CreateResponse) Descriptor() ([]byte, []int)
func (*CreateResponse) Marshal ¶
func (m *CreateResponse) Marshal() (dAtA []byte, err error)
func (*CreateResponse) MarshalToSizedBuffer ¶
func (m *CreateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CreateResponse) ProtoMessage ¶
func (*CreateResponse) ProtoMessage()
func (*CreateResponse) Reset ¶
func (m *CreateResponse) Reset()
func (*CreateResponse) Size ¶
func (m *CreateResponse) Size() (n int)
func (*CreateResponse) String ¶
func (m *CreateResponse) String() string
func (*CreateResponse) Unmarshal ¶
func (m *CreateResponse) Unmarshal(dAtA []byte) error
func (*CreateResponse) XXX_DiscardUnknown ¶
func (m *CreateResponse) XXX_DiscardUnknown()
func (*CreateResponse) XXX_Marshal ¶
func (m *CreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CreateResponse) XXX_Merge ¶
func (m *CreateResponse) XXX_Merge(src proto.Message)
func (*CreateResponse) XXX_Size ¶
func (m *CreateResponse) XXX_Size() int
func (*CreateResponse) XXX_Unmarshal ¶
func (m *CreateResponse) XXX_Unmarshal(b []byte) error
type DeleteResponse ¶
type DeleteResponse struct { }
DeleteResponse is returned by Delete
func (*DeleteResponse) Descriptor ¶
func (*DeleteResponse) Descriptor() ([]byte, []int)
func (*DeleteResponse) Marshal ¶
func (m *DeleteResponse) Marshal() (dAtA []byte, err error)
func (*DeleteResponse) MarshalToSizedBuffer ¶
func (m *DeleteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*DeleteResponse) ProtoMessage ¶
func (*DeleteResponse) ProtoMessage()
func (*DeleteResponse) Reset ¶
func (m *DeleteResponse) Reset()
func (*DeleteResponse) Size ¶
func (m *DeleteResponse) Size() (n int)
func (*DeleteResponse) String ¶
func (m *DeleteResponse) String() string
func (*DeleteResponse) Unmarshal ¶
func (m *DeleteResponse) Unmarshal(dAtA []byte) error
func (*DeleteResponse) XXX_DiscardUnknown ¶
func (m *DeleteResponse) XXX_DiscardUnknown()
func (*DeleteResponse) XXX_Marshal ¶
func (m *DeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DeleteResponse) XXX_Merge ¶
func (m *DeleteResponse) XXX_Merge(src proto.Message)
func (*DeleteResponse) XXX_Size ¶
func (m *DeleteResponse) XXX_Size() int
func (*DeleteResponse) XXX_Unmarshal ¶
func (m *DeleteResponse) XXX_Unmarshal(b []byte) error
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=router.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"` }
Event is routing table event
func (*Event) Descriptor ¶
func (*Event) GetTimestamp ¶
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) XXX_DiscardUnknown ¶
func (m *Event) XXX_DiscardUnknown()
func (*Event) XXX_Marshal ¶
func (*Event) XXX_Unmarshal ¶
type EventType ¶
type EventType int32
EventType defines the type of event
func (EventType) EnumDescriptor ¶
type ListResponse ¶
type ListResponse struct {
Routes []*Route `protobuf:"bytes,1,rep,name=routes,proto3" json:"routes,omitempty"`
}
ListResponse is returned by List
func (*ListResponse) Descriptor ¶
func (*ListResponse) Descriptor() ([]byte, []int)
func (*ListResponse) GetRoutes ¶
func (m *ListResponse) GetRoutes() []*Route
func (*ListResponse) Marshal ¶
func (m *ListResponse) Marshal() (dAtA []byte, err error)
func (*ListResponse) MarshalToSizedBuffer ¶
func (m *ListResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ListResponse) ProtoMessage ¶
func (*ListResponse) ProtoMessage()
func (*ListResponse) Reset ¶
func (m *ListResponse) Reset()
func (*ListResponse) Size ¶
func (m *ListResponse) Size() (n int)
func (*ListResponse) String ¶
func (m *ListResponse) String() string
func (*ListResponse) Unmarshal ¶
func (m *ListResponse) Unmarshal(dAtA []byte) error
func (*ListResponse) XXX_DiscardUnknown ¶
func (m *ListResponse) XXX_DiscardUnknown()
func (*ListResponse) XXX_Marshal ¶
func (m *ListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListResponse) XXX_Merge ¶
func (m *ListResponse) XXX_Merge(src proto.Message)
func (*ListResponse) XXX_Size ¶
func (m *ListResponse) XXX_Size() int
func (*ListResponse) XXX_Unmarshal ¶
func (m *ListResponse) XXX_Unmarshal(b []byte) error
type LookupRequest ¶
type LookupRequest struct {
Query *Query `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
}
LookupRequest is made to Lookup
func (*LookupRequest) Descriptor ¶
func (*LookupRequest) Descriptor() ([]byte, []int)
func (*LookupRequest) GetQuery ¶
func (m *LookupRequest) GetQuery() *Query
func (*LookupRequest) Marshal ¶
func (m *LookupRequest) Marshal() (dAtA []byte, err error)
func (*LookupRequest) MarshalToSizedBuffer ¶
func (m *LookupRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LookupRequest) ProtoMessage ¶
func (*LookupRequest) ProtoMessage()
func (*LookupRequest) Reset ¶
func (m *LookupRequest) Reset()
func (*LookupRequest) Size ¶
func (m *LookupRequest) Size() (n int)
func (*LookupRequest) String ¶
func (m *LookupRequest) String() string
func (*LookupRequest) Unmarshal ¶
func (m *LookupRequest) Unmarshal(dAtA []byte) error
func (*LookupRequest) XXX_DiscardUnknown ¶
func (m *LookupRequest) XXX_DiscardUnknown()
func (*LookupRequest) XXX_Marshal ¶
func (m *LookupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LookupRequest) XXX_Merge ¶
func (m *LookupRequest) XXX_Merge(src proto.Message)
func (*LookupRequest) XXX_Size ¶
func (m *LookupRequest) XXX_Size() int
func (*LookupRequest) XXX_Unmarshal ¶
func (m *LookupRequest) XXX_Unmarshal(b []byte) error
type LookupResponse ¶
type LookupResponse struct {
Routes []*Route `protobuf:"bytes,1,rep,name=routes,proto3" json:"routes,omitempty"`
}
LookupResponse is returned by Lookup
func (*LookupResponse) Descriptor ¶
func (*LookupResponse) Descriptor() ([]byte, []int)
func (*LookupResponse) GetRoutes ¶
func (m *LookupResponse) GetRoutes() []*Route
func (*LookupResponse) Marshal ¶
func (m *LookupResponse) Marshal() (dAtA []byte, err error)
func (*LookupResponse) MarshalToSizedBuffer ¶
func (m *LookupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LookupResponse) ProtoMessage ¶
func (*LookupResponse) ProtoMessage()
func (*LookupResponse) Reset ¶
func (m *LookupResponse) Reset()
func (*LookupResponse) Size ¶
func (m *LookupResponse) Size() (n int)
func (*LookupResponse) String ¶
func (m *LookupResponse) String() string
func (*LookupResponse) Unmarshal ¶
func (m *LookupResponse) Unmarshal(dAtA []byte) error
func (*LookupResponse) XXX_DiscardUnknown ¶
func (m *LookupResponse) XXX_DiscardUnknown()
func (*LookupResponse) XXX_Marshal ¶
func (m *LookupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LookupResponse) XXX_Merge ¶
func (m *LookupResponse) XXX_Merge(src proto.Message)
func (*LookupResponse) XXX_Size ¶
func (m *LookupResponse) XXX_Size() int
func (*LookupResponse) XXX_Unmarshal ¶
func (m *LookupResponse) XXX_Unmarshal(b []byte) error
type ProcessResponse ¶
type ProcessResponse struct { }
ProcessResponse is returned by Process
func (*ProcessResponse) Descriptor ¶
func (*ProcessResponse) Descriptor() ([]byte, []int)
func (*ProcessResponse) Marshal ¶
func (m *ProcessResponse) Marshal() (dAtA []byte, err error)
func (*ProcessResponse) MarshalToSizedBuffer ¶
func (m *ProcessResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ProcessResponse) ProtoMessage ¶
func (*ProcessResponse) ProtoMessage()
func (*ProcessResponse) Reset ¶
func (m *ProcessResponse) Reset()
func (*ProcessResponse) Size ¶
func (m *ProcessResponse) Size() (n int)
func (*ProcessResponse) String ¶
func (m *ProcessResponse) String() string
func (*ProcessResponse) Unmarshal ¶
func (m *ProcessResponse) Unmarshal(dAtA []byte) error
func (*ProcessResponse) XXX_DiscardUnknown ¶
func (m *ProcessResponse) XXX_DiscardUnknown()
func (*ProcessResponse) XXX_Marshal ¶
func (m *ProcessResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ProcessResponse) XXX_Merge ¶
func (m *ProcessResponse) XXX_Merge(src proto.Message)
func (*ProcessResponse) XXX_Size ¶
func (m *ProcessResponse) XXX_Size() int
func (*ProcessResponse) XXX_Unmarshal ¶
func (m *ProcessResponse) XXX_Unmarshal(b []byte) error
type Query ¶
type Query struct { // service to lookup Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` // gateway to lookup Gateway string `protobuf:"bytes,2,opt,name=gateway,proto3" json:"gateway,omitempty"` // network to lookup Network string `protobuf:"bytes,3,opt,name=network,proto3" json:"network,omitempty"` }
Query is passed in a LookupRequest
func (*Query) Descriptor ¶
func (*Query) GetGateway ¶
func (*Query) GetNetwork ¶
func (*Query) GetService ¶
func (*Query) ProtoMessage ¶
func (*Query) ProtoMessage()
func (*Query) XXX_DiscardUnknown ¶
func (m *Query) XXX_DiscardUnknown()
func (*Query) XXX_Marshal ¶
func (*Query) XXX_Unmarshal ¶
type QueryRequest ¶
type QueryRequest struct {
Query *Query `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
}
QueryRequest queries Table for Routes
func (*QueryRequest) Descriptor ¶
func (*QueryRequest) Descriptor() ([]byte, []int)
func (*QueryRequest) GetQuery ¶
func (m *QueryRequest) GetQuery() *Query
func (*QueryRequest) Marshal ¶
func (m *QueryRequest) Marshal() (dAtA []byte, err error)
func (*QueryRequest) MarshalToSizedBuffer ¶
func (m *QueryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryRequest) ProtoMessage ¶
func (*QueryRequest) ProtoMessage()
func (*QueryRequest) Reset ¶
func (m *QueryRequest) Reset()
func (*QueryRequest) Size ¶
func (m *QueryRequest) Size() (n int)
func (*QueryRequest) String ¶
func (m *QueryRequest) String() string
func (*QueryRequest) Unmarshal ¶
func (m *QueryRequest) Unmarshal(dAtA []byte) error
func (*QueryRequest) XXX_DiscardUnknown ¶
func (m *QueryRequest) XXX_DiscardUnknown()
func (*QueryRequest) XXX_Marshal ¶
func (m *QueryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryRequest) XXX_Merge ¶
func (m *QueryRequest) XXX_Merge(src proto.Message)
func (*QueryRequest) XXX_Size ¶
func (m *QueryRequest) XXX_Size() int
func (*QueryRequest) XXX_Unmarshal ¶
func (m *QueryRequest) XXX_Unmarshal(b []byte) error
type QueryResponse ¶
type QueryResponse struct {
Routes []*Route `protobuf:"bytes,1,rep,name=routes,proto3" json:"routes,omitempty"`
}
QueryResponse is returned by Query
func (*QueryResponse) Descriptor ¶
func (*QueryResponse) Descriptor() ([]byte, []int)
func (*QueryResponse) GetRoutes ¶
func (m *QueryResponse) GetRoutes() []*Route
func (*QueryResponse) Marshal ¶
func (m *QueryResponse) Marshal() (dAtA []byte, err error)
func (*QueryResponse) MarshalToSizedBuffer ¶
func (m *QueryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryResponse) ProtoMessage ¶
func (*QueryResponse) ProtoMessage()
func (*QueryResponse) Reset ¶
func (m *QueryResponse) Reset()
func (*QueryResponse) Size ¶
func (m *QueryResponse) Size() (n int)
func (*QueryResponse) String ¶
func (m *QueryResponse) String() string
func (*QueryResponse) Unmarshal ¶
func (m *QueryResponse) Unmarshal(dAtA []byte) error
func (*QueryResponse) XXX_DiscardUnknown ¶
func (m *QueryResponse) XXX_DiscardUnknown()
func (*QueryResponse) XXX_Marshal ¶
func (m *QueryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryResponse) XXX_Merge ¶
func (m *QueryResponse) XXX_Merge(src proto.Message)
func (*QueryResponse) XXX_Size ¶
func (m *QueryResponse) XXX_Size() int
func (*QueryResponse) XXX_Unmarshal ¶
func (m *QueryResponse) XXX_Unmarshal(b []byte) error
type Request ¶
type Request struct { }
Empty request
func (*Request) Descriptor ¶
func (*Request) MarshalToSizedBuffer ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) XXX_DiscardUnknown ¶
func (m *Request) XXX_DiscardUnknown()
func (*Request) XXX_Marshal ¶
func (*Request) XXX_Unmarshal ¶
type Response ¶
type Response struct { }
Empty response
func (*Response) Descriptor ¶
func (*Response) MarshalToSizedBuffer ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) XXX_DiscardUnknown ¶
func (m *Response) XXX_DiscardUnknown()
func (*Response) XXX_Marshal ¶
func (*Response) XXX_Unmarshal ¶
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"` }
Route is a service route
func (*Route) Descriptor ¶
func (*Route) GetAddress ¶
func (*Route) GetGateway ¶
func (*Route) GetNetwork ¶
func (*Route) GetService ¶
func (*Route) ProtoMessage ¶
func (*Route) ProtoMessage()
func (*Route) XXX_DiscardUnknown ¶
func (m *Route) XXX_DiscardUnknown()
func (*Route) XXX_Marshal ¶
func (*Route) XXX_Unmarshal ¶
type RouterClient ¶
type RouterClient interface { Lookup(ctx context.Context, in *LookupRequest, opts ...grpc.CallOption) (*LookupResponse, error) Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (Router_WatchClient, error) Advertise(ctx context.Context, in *Request, opts ...grpc.CallOption) (Router_AdvertiseClient, error) Process(ctx context.Context, in *Advert, opts ...grpc.CallOption) (*ProcessResponse, error) }
RouterClient is the client API for Router service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRouterClient ¶
func NewRouterClient(cc *grpc.ClientConn) RouterClient
type RouterHandler ¶
type RouterHandler interface { Lookup(context.Context, *LookupRequest, *LookupResponse) error Watch(context.Context, *WatchRequest, Router_WatchStream) error Advertise(context.Context, *Request, Router_AdvertiseStream) error Process(context.Context, *Advert, *ProcessResponse) error }
Server API for Router service
type RouterServer ¶
type RouterServer interface { Lookup(context.Context, *LookupRequest) (*LookupResponse, error) Watch(*WatchRequest, Router_WatchServer) error Advertise(*Request, Router_AdvertiseServer) error Process(context.Context, *Advert) (*ProcessResponse, error) }
RouterServer is the server API for Router service.
type RouterService ¶
type RouterService interface { Lookup(ctx context.Context, in *LookupRequest, opts ...client.CallOption) (*LookupResponse, error) Watch(ctx context.Context, in *WatchRequest, opts ...client.CallOption) (Router_WatchService, error) Advertise(ctx context.Context, in *Request, opts ...client.CallOption) (Router_AdvertiseService, error) Process(ctx context.Context, in *Advert, opts ...client.CallOption) (*ProcessResponse, error) }
Client API for Router service
func NewRouterService ¶
func NewRouterService(name string, c client.Client) RouterService
type Router_AdvertiseClient ¶
type Router_AdvertiseClient interface { Recv() (*Advert, error) grpc.ClientStream }
type Router_AdvertiseServer ¶
type Router_AdvertiseServer interface { Send(*Advert) error grpc.ServerStream }
type Router_AdvertiseService ¶
type Router_AdvertiseStream ¶
type Router_WatchClient ¶
type Router_WatchClient interface { Recv() (*Event, error) grpc.ClientStream }
type Router_WatchServer ¶
type Router_WatchServer interface { Send(*Event) error grpc.ServerStream }
type Router_WatchService ¶
type Router_WatchStream ¶
type TableClient ¶
type TableClient interface { Create(ctx context.Context, in *Route, opts ...grpc.CallOption) (*CreateResponse, error) Delete(ctx context.Context, in *Route, opts ...grpc.CallOption) (*DeleteResponse, error) Update(ctx context.Context, in *Route, opts ...grpc.CallOption) (*UpdateResponse, error) List(ctx context.Context, in *Request, opts ...grpc.CallOption) (*ListResponse, error) Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) }
TableClient is the client API for Table service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewTableClient ¶
func NewTableClient(cc *grpc.ClientConn) TableClient
type TableHandler ¶
type TableHandler interface { Create(context.Context, *Route, *CreateResponse) error Delete(context.Context, *Route, *DeleteResponse) error Update(context.Context, *Route, *UpdateResponse) error List(context.Context, *Request, *ListResponse) error Query(context.Context, *QueryRequest, *QueryResponse) error }
Server API for Table service
type TableServer ¶
type TableServer interface { Create(context.Context, *Route) (*CreateResponse, error) Delete(context.Context, *Route) (*DeleteResponse, error) Update(context.Context, *Route) (*UpdateResponse, error) List(context.Context, *Request) (*ListResponse, error) Query(context.Context, *QueryRequest) (*QueryResponse, error) }
TableServer is the server API for Table service.
type TableService ¶
type TableService interface { Create(ctx context.Context, in *Route, opts ...client.CallOption) (*CreateResponse, error) Delete(ctx context.Context, in *Route, opts ...client.CallOption) (*DeleteResponse, error) Update(ctx context.Context, in *Route, opts ...client.CallOption) (*UpdateResponse, error) List(ctx context.Context, in *Request, opts ...client.CallOption) (*ListResponse, error) Query(ctx context.Context, in *QueryRequest, opts ...client.CallOption) (*QueryResponse, error) }
Client API for Table service
func NewTableService ¶
func NewTableService(name string, c client.Client) TableService
type UnimplementedRouterServer ¶
type UnimplementedRouterServer struct { }
UnimplementedRouterServer can be embedded to have forward compatible implementations.
func (*UnimplementedRouterServer) Advertise ¶
func (*UnimplementedRouterServer) Advertise(req *Request, srv Router_AdvertiseServer) error
func (*UnimplementedRouterServer) Lookup ¶
func (*UnimplementedRouterServer) Lookup(ctx context.Context, req *LookupRequest) (*LookupResponse, error)
func (*UnimplementedRouterServer) Process ¶
func (*UnimplementedRouterServer) Process(ctx context.Context, req *Advert) (*ProcessResponse, error)
func (*UnimplementedRouterServer) Watch ¶
func (*UnimplementedRouterServer) Watch(req *WatchRequest, srv Router_WatchServer) error
type UnimplementedTableServer ¶
type UnimplementedTableServer struct { }
UnimplementedTableServer can be embedded to have forward compatible implementations.
func (*UnimplementedTableServer) Create ¶
func (*UnimplementedTableServer) Create(ctx context.Context, req *Route) (*CreateResponse, error)
func (*UnimplementedTableServer) Delete ¶
func (*UnimplementedTableServer) Delete(ctx context.Context, req *Route) (*DeleteResponse, error)
func (*UnimplementedTableServer) List ¶
func (*UnimplementedTableServer) List(ctx context.Context, req *Request) (*ListResponse, error)
func (*UnimplementedTableServer) Query ¶
func (*UnimplementedTableServer) Query(ctx context.Context, req *QueryRequest) (*QueryResponse, error)
func (*UnimplementedTableServer) Update ¶
func (*UnimplementedTableServer) Update(ctx context.Context, req *Route) (*UpdateResponse, error)
type UpdateResponse ¶
type UpdateResponse struct { }
UpdateResponse is returned by Update
func (*UpdateResponse) Descriptor ¶
func (*UpdateResponse) Descriptor() ([]byte, []int)
func (*UpdateResponse) Marshal ¶
func (m *UpdateResponse) Marshal() (dAtA []byte, err error)
func (*UpdateResponse) MarshalToSizedBuffer ¶
func (m *UpdateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*UpdateResponse) ProtoMessage ¶
func (*UpdateResponse) ProtoMessage()
func (*UpdateResponse) Reset ¶
func (m *UpdateResponse) Reset()
func (*UpdateResponse) Size ¶
func (m *UpdateResponse) Size() (n int)
func (*UpdateResponse) String ¶
func (m *UpdateResponse) String() string
func (*UpdateResponse) Unmarshal ¶
func (m *UpdateResponse) Unmarshal(dAtA []byte) error
func (*UpdateResponse) XXX_DiscardUnknown ¶
func (m *UpdateResponse) XXX_DiscardUnknown()
func (*UpdateResponse) XXX_Marshal ¶
func (m *UpdateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UpdateResponse) XXX_Merge ¶
func (m *UpdateResponse) XXX_Merge(src proto.Message)
func (*UpdateResponse) XXX_Size ¶
func (m *UpdateResponse) XXX_Size() int
func (*UpdateResponse) XXX_Unmarshal ¶
func (m *UpdateResponse) XXX_Unmarshal(b []byte) error
type WatchRequest ¶
type WatchRequest struct { }
WatchRequest is made to Watch Router
func (*WatchRequest) Descriptor ¶
func (*WatchRequest) Descriptor() ([]byte, []int)
func (*WatchRequest) Marshal ¶
func (m *WatchRequest) Marshal() (dAtA []byte, err error)
func (*WatchRequest) MarshalToSizedBuffer ¶
func (m *WatchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*WatchRequest) ProtoMessage ¶
func (*WatchRequest) ProtoMessage()
func (*WatchRequest) Reset ¶
func (m *WatchRequest) Reset()
func (*WatchRequest) Size ¶
func (m *WatchRequest) Size() (n int)
func (*WatchRequest) String ¶
func (m *WatchRequest) String() string
func (*WatchRequest) Unmarshal ¶
func (m *WatchRequest) Unmarshal(dAtA []byte) error
func (*WatchRequest) XXX_DiscardUnknown ¶
func (m *WatchRequest) XXX_DiscardUnknown()
func (*WatchRequest) XXX_Marshal ¶
func (m *WatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*WatchRequest) XXX_Merge ¶
func (m *WatchRequest) XXX_Merge(src proto.Message)
func (*WatchRequest) XXX_Size ¶
func (m *WatchRequest) XXX_Size() int
func (*WatchRequest) XXX_Unmarshal ¶
func (m *WatchRequest) XXX_Unmarshal(b []byte) error