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 (*Advert) ProtoMessage()
- 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
- type CreateResponse
- 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
- 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
- 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 (*Event) ProtoMessage()
- 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
- type ListResponse
- func (*ListResponse) Descriptor() ([]byte, []int)
- func (m *ListResponse) GetRoutes() []*Route
- func (*ListResponse) ProtoMessage()
- 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
- func (*LookupRequest) Descriptor() ([]byte, []int)
- func (m *LookupRequest) GetQuery() *Query
- func (*LookupRequest) ProtoMessage()
- 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
- func (*LookupResponse) Descriptor() ([]byte, []int)
- func (m *LookupResponse) GetRoutes() []*Route
- func (*LookupResponse) ProtoMessage()
- 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
- 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
- func (*Query) Descriptor() ([]byte, []int)
- func (m *Query) GetGateway() string
- func (m *Query) GetNetwork() string
- func (m *Query) GetService() string
- func (*Query) ProtoMessage()
- 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
- func (*QueryRequest) Descriptor() ([]byte, []int)
- func (m *QueryRequest) GetQuery() *Query
- func (*QueryRequest) ProtoMessage()
- 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
- func (*QueryResponse) Descriptor() ([]byte, []int)
- func (m *QueryResponse) GetRoutes() []*Route
- func (*QueryResponse) ProtoMessage()
- 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
- 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
- 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
- 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 (*Route) ProtoMessage()
- 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
- 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 (*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
- 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
Constants ¶
This section is empty.
Variables ¶
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 ¶
func NewTableEndpoints ¶
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=go.micro.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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Advert is router advertsement streamed by Watch
func (*Advert) Descriptor ¶
func (*Advert) GetTimestamp ¶
func (*Advert) GetType ¶
func (m *Advert) GetType() AdvertType
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 { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
CreateResponse is returned by Create
func (*CreateResponse) Descriptor ¶
func (*CreateResponse) Descriptor() ([]byte, []int)
func (*CreateResponse) ProtoMessage ¶
func (*CreateResponse) ProtoMessage()
func (*CreateResponse) Reset ¶
func (m *CreateResponse) Reset()
func (*CreateResponse) String ¶
func (m *CreateResponse) String() string
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 { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
DeleteResponse is returned by Delete
func (*DeleteResponse) Descriptor ¶
func (*DeleteResponse) Descriptor() ([]byte, []int)
func (*DeleteResponse) ProtoMessage ¶
func (*DeleteResponse) ProtoMessage()
func (*DeleteResponse) Reset ¶
func (m *DeleteResponse) Reset()
func (*DeleteResponse) String ¶
func (m *DeleteResponse) String() string
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=go.micro.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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
ListResponse is returned by List
func (*ListResponse) Descriptor ¶
func (*ListResponse) Descriptor() ([]byte, []int)
func (*ListResponse) GetRoutes ¶
func (m *ListResponse) GetRoutes() []*Route
func (*ListResponse) ProtoMessage ¶
func (*ListResponse) ProtoMessage()
func (*ListResponse) Reset ¶
func (m *ListResponse) Reset()
func (*ListResponse) String ¶
func (m *ListResponse) String() string
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
LookupRequest is made to Lookup
func (*LookupRequest) Descriptor ¶
func (*LookupRequest) Descriptor() ([]byte, []int)
func (*LookupRequest) GetQuery ¶
func (m *LookupRequest) GetQuery() *Query
func (*LookupRequest) ProtoMessage ¶
func (*LookupRequest) ProtoMessage()
func (*LookupRequest) Reset ¶
func (m *LookupRequest) Reset()
func (*LookupRequest) String ¶
func (m *LookupRequest) String() string
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
LookupResponse is returned by Lookup
func (*LookupResponse) Descriptor ¶
func (*LookupResponse) Descriptor() ([]byte, []int)
func (*LookupResponse) GetRoutes ¶
func (m *LookupResponse) GetRoutes() []*Route
func (*LookupResponse) ProtoMessage ¶
func (*LookupResponse) ProtoMessage()
func (*LookupResponse) Reset ¶
func (m *LookupResponse) Reset()
func (*LookupResponse) String ¶
func (m *LookupResponse) String() string
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 { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
ProcessResponse is returned by Process
func (*ProcessResponse) Descriptor ¶
func (*ProcessResponse) Descriptor() ([]byte, []int)
func (*ProcessResponse) ProtoMessage ¶
func (*ProcessResponse) ProtoMessage()
func (*ProcessResponse) Reset ¶
func (m *ProcessResponse) Reset()
func (*ProcessResponse) String ¶
func (m *ProcessResponse) String() string
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
QueryRequest queries Table for Routes
func (*QueryRequest) Descriptor ¶
func (*QueryRequest) Descriptor() ([]byte, []int)
func (*QueryRequest) GetQuery ¶
func (m *QueryRequest) GetQuery() *Query
func (*QueryRequest) ProtoMessage ¶
func (*QueryRequest) ProtoMessage()
func (*QueryRequest) Reset ¶
func (m *QueryRequest) Reset()
func (*QueryRequest) String ¶
func (m *QueryRequest) String() string
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
QueryResponse is returned by Query
func (*QueryResponse) Descriptor ¶
func (*QueryResponse) Descriptor() ([]byte, []int)
func (*QueryResponse) GetRoutes ¶
func (m *QueryResponse) GetRoutes() []*Route
func (*QueryResponse) ProtoMessage ¶
func (*QueryResponse) ProtoMessage()
func (*QueryResponse) Reset ¶
func (m *QueryResponse) Reset()
func (*QueryResponse) String ¶
func (m *QueryResponse) String() string
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 { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Empty request
func (*Request) Descriptor ¶
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 { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Empty response
func (*Response) Descriptor ¶
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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 }
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) }
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 }
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) }
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 { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
UpdateResponse is returned by Update
func (*UpdateResponse) Descriptor ¶
func (*UpdateResponse) Descriptor() ([]byte, []int)
func (*UpdateResponse) ProtoMessage ¶
func (*UpdateResponse) ProtoMessage()
func (*UpdateResponse) Reset ¶
func (m *UpdateResponse) Reset()
func (*UpdateResponse) String ¶
func (m *UpdateResponse) String() string
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 { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
WatchRequest is made to Watch Router
func (*WatchRequest) Descriptor ¶
func (*WatchRequest) Descriptor() ([]byte, []int)
func (*WatchRequest) ProtoMessage ¶
func (*WatchRequest) ProtoMessage()
func (*WatchRequest) Reset ¶
func (m *WatchRequest) Reset()
func (*WatchRequest) String ¶
func (m *WatchRequest) String() string
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