router

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthRouter        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowRouter          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupRouter = fmt.Errorf("proto: unexpected end of group")
)
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

API Endpoints for Router service

func NewRouterOpenAPI

func NewRouterOpenAPI() *registry.OpenAPI

Swagger OpenAPI 3.0 for Router service

func NewTableEndpoints

func NewTableEndpoints() []*api.Endpoint

API Endpoints for Table service

func NewTableOpenAPI

func NewTableOpenAPI() *registry.OpenAPI

Swagger OpenAPI 3.0 for Table 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 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) 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) Marshal

func (m *Advert) Marshal() (dAtA []byte, err error)

func (*Advert) MarshalTo

func (m *Advert) MarshalTo(dAtA []byte) (int, error)

func (*Advert) MarshalToSizedBuffer

func (m *Advert) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Advert) ProtoMessage

func (*Advert) ProtoMessage()

func (*Advert) Reset

func (m *Advert) Reset()

func (*Advert) Size

func (m *Advert) Size() (n int)

func (*Advert) String

func (m *Advert) String() string

func (*Advert) Unmarshal

func (m *Advert) Unmarshal(dAtA []byte) error

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 {
}

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

func (m *CreateResponse) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *DeleteResponse) MarshalTo(dAtA []byte) (int, 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) 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) Marshal

func (m *Event) Marshal() (dAtA []byte, err error)

func (*Event) MarshalTo

func (m *Event) MarshalTo(dAtA []byte) (int, error)

func (*Event) MarshalToSizedBuffer

func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) Reset

func (m *Event) Reset()

func (*Event) Size

func (m *Event) Size() (n int)

func (*Event) String

func (m *Event) String() string

func (*Event) Unmarshal

func (m *Event) Unmarshal(dAtA []byte) error

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"`
}

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

func (m *ListResponse) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *LookupRequest) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *LookupResponse) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *ProcessResponse) MarshalTo(dAtA []byte) (int, 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) 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) Marshal

func (m *Query) Marshal() (dAtA []byte, err error)

func (*Query) MarshalTo

func (m *Query) MarshalTo(dAtA []byte) (int, error)

func (*Query) MarshalToSizedBuffer

func (m *Query) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Query) ProtoMessage

func (*Query) ProtoMessage()

func (*Query) Reset

func (m *Query) Reset()

func (*Query) Size

func (m *Query) Size() (n int)

func (*Query) String

func (m *Query) String() string

func (*Query) Unmarshal

func (m *Query) Unmarshal(dAtA []byte) error

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"`
}

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

func (m *QueryRequest) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *QueryResponse) MarshalTo(dAtA []byte) (int, 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) Descriptor() ([]byte, []int)

func (*Request) Marshal

func (m *Request) Marshal() (dAtA []byte, err error)

func (*Request) MarshalTo

func (m *Request) MarshalTo(dAtA []byte) (int, error)

func (*Request) MarshalToSizedBuffer

func (m *Request) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) Size

func (m *Request) Size() (n int)

func (*Request) String

func (m *Request) String() string

func (*Request) Unmarshal

func (m *Request) Unmarshal(dAtA []byte) error

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 {
}

Empty response

func (*Response) Descriptor

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

func (*Response) Marshal

func (m *Response) Marshal() (dAtA []byte, err error)

func (*Response) MarshalTo

func (m *Response) MarshalTo(dAtA []byte) (int, error)

func (*Response) MarshalToSizedBuffer

func (m *Response) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) Size

func (m *Response) Size() (n int)

func (*Response) String

func (m *Response) String() string

func (*Response) Unmarshal

func (m *Response) Unmarshal(dAtA []byte) error

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"`
}

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

func (m *Route) Marshal() (dAtA []byte, err error)

func (*Route) MarshalTo

func (m *Route) MarshalTo(dAtA []byte) (int, error)

func (*Route) MarshalToSizedBuffer

func (m *Route) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Route) ProtoMessage

func (*Route) ProtoMessage()

func (*Route) Reset

func (m *Route) Reset()

func (*Route) Size

func (m *Route) Size() (n int)

func (*Route) String

func (m *Route) String() string

func (*Route) Unmarshal

func (m *Route) Unmarshal(dAtA []byte) error

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 RouterHandler

Server API for Router service Router service is used by the proxy to lookup routes

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

Client API for Router service Router service is used by the proxy to lookup routes

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 TableHandler

Server API for Table service

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

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) 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 {
}

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

func (m *UpdateResponse) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *WatchRequest) MarshalTo(dAtA []byte) (int, 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

Jump to

Keyboard shortcuts

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