router

package
v2.5.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2020 License: Apache-2.0 Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AdvertType_name = map[int32]string{
	0: "AdvertAnnounce",
	1: "AdvertUpdate",
}
View Source
var AdvertType_value = map[string]int32{
	"AdvertAnnounce": 0,
	"AdvertUpdate":   1,
}
View Source
var EventType_name = map[int32]string{
	0: "Create",
	1: "Delete",
	2: "Update",
}
View Source
var EventType_value = map[string]int32{
	"Create": 0,
	"Delete": 1,
	"Update": 2,
}

Functions

func NewRouterEndpoints

func NewRouterEndpoints() []*api.Endpoint

func NewTableEndpoints

func NewTableEndpoints() []*api.Endpoint

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 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) Descriptor() ([]byte, []int)

func (*Advert) GetEvents

func (m *Advert) GetEvents() []*Event

func (*Advert) GetId

func (m *Advert) GetId() string

func (*Advert) GetTimestamp

func (m *Advert) GetTimestamp() int64

func (*Advert) GetTtl

func (m *Advert) GetTtl() int64

func (*Advert) GetType

func (m *Advert) GetType() AdvertType

func (*Advert) ProtoMessage

func (*Advert) ProtoMessage()

func (*Advert) Reset

func (m *Advert) Reset()

func (*Advert) String

func (m *Advert) String() string

func (*Advert) XXX_DiscardUnknown

func (m *Advert) XXX_DiscardUnknown()

func (*Advert) XXX_Marshal

func (m *Advert) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Advert) XXX_Merge

func (m *Advert) XXX_Merge(src proto.Message)

func (*Advert) XXX_Size

func (m *Advert) XXX_Size() int

func (*Advert) XXX_Unmarshal

func (m *Advert) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*Event) GetId

func (m *Event) GetId() string

func (*Event) GetRoute

func (m *Event) GetRoute() *Route

func (*Event) GetTimestamp

func (m *Event) GetTimestamp() int64

func (*Event) GetType

func (m *Event) GetType() EventType

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) Reset

func (m *Event) Reset()

func (*Event) String

func (m *Event) String() string

func (*Event) XXX_DiscardUnknown

func (m *Event) XXX_DiscardUnknown()

func (*Event) XXX_Marshal

func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Event) XXX_Merge

func (m *Event) XXX_Merge(src proto.Message)

func (*Event) XXX_Size

func (m *Event) XXX_Size() int

func (*Event) XXX_Unmarshal

func (m *Event) XXX_Unmarshal(b []byte) error

type EventType

type EventType int32

EventType defines the type of event

const (
	EventType_Create EventType = 0
	EventType_Delete EventType = 1
	EventType_Update EventType = 2
)

func (EventType) EnumDescriptor

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

func (EventType) String

func (x EventType) String() string

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) Descriptor() ([]byte, []int)

func (*Query) GetGateway

func (m *Query) GetGateway() string

func (*Query) GetNetwork

func (m *Query) GetNetwork() string

func (*Query) GetService

func (m *Query) GetService() string

func (*Query) ProtoMessage

func (*Query) ProtoMessage()

func (*Query) Reset

func (m *Query) Reset()

func (*Query) String

func (m *Query) String() string

func (*Query) XXX_DiscardUnknown

func (m *Query) XXX_DiscardUnknown()

func (*Query) XXX_Marshal

func (m *Query) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Query) XXX_Merge

func (m *Query) XXX_Merge(src proto.Message)

func (*Query) XXX_Size

func (m *Query) XXX_Size() int

func (*Query) XXX_Unmarshal

func (m *Query) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) String

func (m *Request) String() string

func (*Request) XXX_DiscardUnknown

func (m *Request) XXX_DiscardUnknown()

func (*Request) XXX_Marshal

func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Request) XXX_Merge

func (m *Request) XXX_Merge(src proto.Message)

func (*Request) XXX_Size

func (m *Request) XXX_Size() int

func (*Request) XXX_Unmarshal

func (m *Request) XXX_Unmarshal(b []byte) error

type Response

type Response struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Empty response

func (*Response) Descriptor

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

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) String

func (m *Response) String() string

func (*Response) XXX_DiscardUnknown

func (m *Response) XXX_DiscardUnknown()

func (*Response) XXX_Marshal

func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Response) XXX_Merge

func (m *Response) XXX_Merge(src proto.Message)

func (*Response) XXX_Size

func (m *Response) XXX_Size() int

func (*Response) XXX_Unmarshal

func (m *Response) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*Route) GetAddress

func (m *Route) GetAddress() string

func (*Route) GetGateway

func (m *Route) GetGateway() string
func (m *Route) GetLink() string

func (*Route) GetMetric

func (m *Route) GetMetric() int64

func (*Route) GetNetwork

func (m *Route) GetNetwork() string

func (*Route) GetRouter

func (m *Route) GetRouter() string

func (*Route) GetService

func (m *Route) GetService() string

func (*Route) ProtoMessage

func (*Route) ProtoMessage()

func (*Route) Reset

func (m *Route) Reset()

func (*Route) String

func (m *Route) String() string

func (*Route) XXX_DiscardUnknown

func (m *Route) XXX_DiscardUnknown()

func (*Route) XXX_Marshal

func (m *Route) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Route) XXX_Merge

func (m *Route) XXX_Merge(src proto.Message)

func (*Route) XXX_Size

func (m *Route) XXX_Size() int

func (*Route) XXX_Unmarshal

func (m *Route) XXX_Unmarshal(b []byte) error

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 RouterServer

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_AdvertiseService interface {
	Context() context.Context
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Recv() (*Advert, error)
}

type Router_AdvertiseStream

type Router_AdvertiseStream interface {
	Context() context.Context
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Send(*Advert) error
}

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_WatchService interface {
	Context() context.Context
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Recv() (*Event, error)
}

type Router_WatchStream

type Router_WatchStream interface {
	Context() context.Context
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Send(*Event) error
}

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 TableServer

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) Lookup

func (*UnimplementedRouterServer) Process

func (*UnimplementedRouterServer) Watch

type UnimplementedTableServer

type UnimplementedTableServer struct {
}

UnimplementedTableServer can be embedded to have forward compatible implementations.

func (*UnimplementedTableServer) Create

func (*UnimplementedTableServer) Delete

func (*UnimplementedTableServer) List

func (*UnimplementedTableServer) Query

func (*UnimplementedTableServer) Update

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL