proto

package
v0.0.0-...-ba645fd Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2019 License: MIT Imports: 5 Imported by: 0

README

cd /pkg/router/proto protoc -I ./ router.proto --go_out=plugins=grpc:.

protoc pkg/router/proto/router.proto --go_out=plugins=grpc:.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRouterServiceServer

func RegisterRouterServiceServer(s *grpc.Server, srv RouterServiceServer)

Types

type CreateOrUpdateRouteRequest

type CreateOrUpdateRouteRequest struct {
	SessionID            string   `protobuf:"bytes,1,opt,name=SessionID,proto3" json:"SessionID,omitempty"`
	MemberID             string   `protobuf:"bytes,2,opt,name=MemberID,proto3" json:"MemberID,omitempty"`
	GatewayAddr          string   `protobuf:"bytes,3,opt,name=GatewayAddr,proto3" json:"GatewayAddr,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CreateOrUpdateRouteRequest) Descriptor

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

func (*CreateOrUpdateRouteRequest) GetGatewayAddr

func (m *CreateOrUpdateRouteRequest) GetGatewayAddr() string

func (*CreateOrUpdateRouteRequest) GetMemberID

func (m *CreateOrUpdateRouteRequest) GetMemberID() string

func (*CreateOrUpdateRouteRequest) GetSessionID

func (m *CreateOrUpdateRouteRequest) GetSessionID() string

func (*CreateOrUpdateRouteRequest) ProtoMessage

func (*CreateOrUpdateRouteRequest) ProtoMessage()

func (*CreateOrUpdateRouteRequest) Reset

func (m *CreateOrUpdateRouteRequest) Reset()

func (*CreateOrUpdateRouteRequest) String

func (m *CreateOrUpdateRouteRequest) String() string

func (*CreateOrUpdateRouteRequest) XXX_DiscardUnknown

func (m *CreateOrUpdateRouteRequest) XXX_DiscardUnknown()

func (*CreateOrUpdateRouteRequest) XXX_Marshal

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

func (*CreateOrUpdateRouteRequest) XXX_Merge

func (dst *CreateOrUpdateRouteRequest) XXX_Merge(src proto.Message)

func (*CreateOrUpdateRouteRequest) XXX_Size

func (m *CreateOrUpdateRouteRequest) XXX_Size() int

func (*CreateOrUpdateRouteRequest) XXX_Unmarshal

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

type DeleteSessionRequest

type DeleteSessionRequest struct {
	SessionID            string   `protobuf:"bytes,1,opt,name=SessionID,proto3" json:"SessionID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DeleteSessionRequest) Descriptor

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

func (*DeleteSessionRequest) GetSessionID

func (m *DeleteSessionRequest) GetSessionID() string

func (*DeleteSessionRequest) ProtoMessage

func (*DeleteSessionRequest) ProtoMessage()

func (*DeleteSessionRequest) Reset

func (m *DeleteSessionRequest) Reset()

func (*DeleteSessionRequest) String

func (m *DeleteSessionRequest) String() string

func (*DeleteSessionRequest) XXX_DiscardUnknown

func (m *DeleteSessionRequest) XXX_DiscardUnknown()

func (*DeleteSessionRequest) XXX_Marshal

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

func (*DeleteSessionRequest) XXX_Merge

func (dst *DeleteSessionRequest) XXX_Merge(src proto.Message)

func (*DeleteSessionRequest) XXX_Size

func (m *DeleteSessionRequest) XXX_Size() int

func (*DeleteSessionRequest) XXX_Unmarshal

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

type EmptyReply

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

func (*EmptyReply) Descriptor

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

func (*EmptyReply) ProtoMessage

func (*EmptyReply) ProtoMessage()

func (*EmptyReply) Reset

func (m *EmptyReply) Reset()

func (*EmptyReply) String

func (m *EmptyReply) String() string

func (*EmptyReply) XXX_DiscardUnknown

func (m *EmptyReply) XXX_DiscardUnknown()

func (*EmptyReply) XXX_Marshal

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

func (*EmptyReply) XXX_Merge

func (dst *EmptyReply) XXX_Merge(src proto.Message)

func (*EmptyReply) XXX_Size

func (m *EmptyReply) XXX_Size() int

func (*EmptyReply) XXX_Unmarshal

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

type EmptyRequest

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

func (*EmptyRequest) Descriptor

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

func (*EmptyRequest) ProtoMessage

func (*EmptyRequest) ProtoMessage()

func (*EmptyRequest) Reset

func (m *EmptyRequest) Reset()

func (*EmptyRequest) String

func (m *EmptyRequest) String() string

func (*EmptyRequest) XXX_DiscardUnknown

func (m *EmptyRequest) XXX_DiscardUnknown()

func (*EmptyRequest) XXX_Marshal

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

func (*EmptyRequest) XXX_Merge

func (dst *EmptyRequest) XXX_Merge(src proto.Message)

func (*EmptyRequest) XXX_Size

func (m *EmptyRequest) XXX_Size() int

func (*EmptyRequest) XXX_Unmarshal

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

type Route

type Route struct {
	SessionID            string   `protobuf:"bytes,1,opt,name=SessionID,proto3" json:"SessionID,omitempty"`
	MemberID             string   `protobuf:"bytes,2,opt,name=MemberID,proto3" json:"MemberID,omitempty"`
	GatewayAddr          string   `protobuf:"bytes,3,opt,name=GatewayAddr,proto3" json:"GatewayAddr,omitempty"`
	LastSeen             int32    `protobuf:"varint,4,opt,name=LastSeen,proto3" json:"LastSeen,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Route) Descriptor

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

func (*Route) GetGatewayAddr

func (m *Route) GetGatewayAddr() string

func (*Route) GetLastSeen

func (m *Route) GetLastSeen() int32

func (*Route) GetMemberID

func (m *Route) GetMemberID() string

func (*Route) GetSessionID

func (m *Route) GetSessionID() 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 (dst *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 RouteReply

type RouteReply 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:"-"`
}

func (*RouteReply) Descriptor

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

func (*RouteReply) GetRoutes

func (m *RouteReply) GetRoutes() []*Route

func (*RouteReply) ProtoMessage

func (*RouteReply) ProtoMessage()

func (*RouteReply) Reset

func (m *RouteReply) Reset()

func (*RouteReply) String

func (m *RouteReply) String() string

func (*RouteReply) XXX_DiscardUnknown

func (m *RouteReply) XXX_DiscardUnknown()

func (*RouteReply) XXX_Marshal

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

func (*RouteReply) XXX_Merge

func (dst *RouteReply) XXX_Merge(src proto.Message)

func (*RouteReply) XXX_Size

func (m *RouteReply) XXX_Size() int

func (*RouteReply) XXX_Unmarshal

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

type RouteRequest

type RouteRequest struct {
	MemberIDs            []string `protobuf:"bytes,1,rep,name=MemberIDs,proto3" json:"MemberIDs,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RouteRequest) Descriptor

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

func (*RouteRequest) GetMemberIDs

func (m *RouteRequest) GetMemberIDs() []string

func (*RouteRequest) ProtoMessage

func (*RouteRequest) ProtoMessage()

func (*RouteRequest) Reset

func (m *RouteRequest) Reset()

func (*RouteRequest) String

func (m *RouteRequest) String() string

func (*RouteRequest) XXX_DiscardUnknown

func (m *RouteRequest) XXX_DiscardUnknown()

func (*RouteRequest) XXX_Marshal

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

func (*RouteRequest) XXX_Merge

func (dst *RouteRequest) XXX_Merge(src proto.Message)

func (*RouteRequest) XXX_Size

func (m *RouteRequest) XXX_Size() int

func (*RouteRequest) XXX_Unmarshal

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

type RouterServiceClient

type RouterServiceClient interface {
	Routes(ctx context.Context, in *RouteRequest, opts ...grpc.CallOption) (*RouteReply, error)
	CreateOrUpdateRoute(ctx context.Context, in *CreateOrUpdateRouteRequest, opts ...grpc.CallOption) (*EmptyReply, error)
	DeleteSession(ctx context.Context, in *DeleteSessionRequest, opts ...grpc.CallOption) (*EmptyReply, error)
}

RouterServiceClient is the client API for RouterService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewRouterServiceClient

func NewRouterServiceClient(cc *grpc.ClientConn) RouterServiceClient

type RouterServiceServer

type RouterServiceServer interface {
	Routes(context.Context, *RouteRequest) (*RouteReply, error)
	CreateOrUpdateRoute(context.Context, *CreateOrUpdateRouteRequest) (*EmptyReply, error)
	DeleteSession(context.Context, *DeleteSessionRequest) (*EmptyReply, error)
}

RouterServiceServer is the server API for RouterService service.

Jump to

Keyboard shortcuts

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