rpc

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2019 License: Apache-2.0 Imports: 6 Imported by: 1

README

protoc --proto_path=$GOPATH/src:. --micro_out=. --go_out=. rpc.proto

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAliceHandler

func RegisterAliceHandler(s server.Server, hdlr AliceHandler, opts ...server.HandlerOption) error

func RegisterBobHandler

func RegisterBobHandler(s server.Server, hdlr BobHandler, opts ...server.HandlerOption) error

Types

type AliceHandler

type AliceHandler interface {
	Sing(context.Context, *AliceRequest, *AliceResponse) error
}

type AliceRequest

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

func (*AliceRequest) Descriptor

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

func (*AliceRequest) GetRevMsg

func (m *AliceRequest) GetRevMsg() string

func (*AliceRequest) ProtoMessage

func (*AliceRequest) ProtoMessage()

func (*AliceRequest) Reset

func (m *AliceRequest) Reset()

func (*AliceRequest) String

func (m *AliceRequest) String() string

func (*AliceRequest) XXX_DiscardUnknown

func (m *AliceRequest) XXX_DiscardUnknown()

func (*AliceRequest) XXX_Marshal

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

func (*AliceRequest) XXX_Merge

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

func (*AliceRequest) XXX_Size

func (m *AliceRequest) XXX_Size() int

func (*AliceRequest) XXX_Unmarshal

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

type AliceResponse

type AliceResponse struct {
	SendMsg              string   `protobuf:"bytes,1,opt,name=send_msg,json=sendMsg,proto3" json:"send_msg,omitempty"`
	RetCode              int32    `protobuf:"zigzag32,2,opt,name=ret_code,json=retCode,proto3" json:"ret_code,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AliceResponse) Descriptor

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

func (*AliceResponse) GetRetCode

func (m *AliceResponse) GetRetCode() int32

func (*AliceResponse) GetSendMsg

func (m *AliceResponse) GetSendMsg() string

func (*AliceResponse) ProtoMessage

func (*AliceResponse) ProtoMessage()

func (*AliceResponse) Reset

func (m *AliceResponse) Reset()

func (*AliceResponse) String

func (m *AliceResponse) String() string

func (*AliceResponse) XXX_DiscardUnknown

func (m *AliceResponse) XXX_DiscardUnknown()

func (*AliceResponse) XXX_Marshal

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

func (*AliceResponse) XXX_Merge

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

func (*AliceResponse) XXX_Size

func (m *AliceResponse) XXX_Size() int

func (*AliceResponse) XXX_Unmarshal

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

type AliceService

type AliceService interface {
	Sing(ctx context.Context, in *AliceRequest, opts ...client.CallOption) (*AliceResponse, error)
}

func NewAliceService

func NewAliceService(name string, c client.Client) AliceService

type BobHandler

type BobHandler interface {
	Dance(context.Context, *BobRequest, *BobResponse) error
}

type BobRequest

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

func (*BobRequest) Descriptor

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

func (*BobRequest) GetRevMsg

func (m *BobRequest) GetRevMsg() string

func (*BobRequest) ProtoMessage

func (*BobRequest) ProtoMessage()

func (*BobRequest) Reset

func (m *BobRequest) Reset()

func (*BobRequest) String

func (m *BobRequest) String() string

func (*BobRequest) XXX_DiscardUnknown

func (m *BobRequest) XXX_DiscardUnknown()

func (*BobRequest) XXX_Marshal

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

func (*BobRequest) XXX_Merge

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

func (*BobRequest) XXX_Size

func (m *BobRequest) XXX_Size() int

func (*BobRequest) XXX_Unmarshal

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

type BobResponse

type BobResponse struct {
	SendMsg              string   `protobuf:"bytes,1,opt,name=send_msg,json=sendMsg,proto3" json:"send_msg,omitempty"`
	RetCode              int32    `protobuf:"zigzag32,2,opt,name=ret_code,json=retCode,proto3" json:"ret_code,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*BobResponse) Descriptor

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

func (*BobResponse) GetRetCode

func (m *BobResponse) GetRetCode() int32

func (*BobResponse) GetSendMsg

func (m *BobResponse) GetSendMsg() string

func (*BobResponse) ProtoMessage

func (*BobResponse) ProtoMessage()

func (*BobResponse) Reset

func (m *BobResponse) Reset()

func (*BobResponse) String

func (m *BobResponse) String() string

func (*BobResponse) XXX_DiscardUnknown

func (m *BobResponse) XXX_DiscardUnknown()

func (*BobResponse) XXX_Marshal

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

func (*BobResponse) XXX_Merge

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

func (*BobResponse) XXX_Size

func (m *BobResponse) XXX_Size() int

func (*BobResponse) XXX_Unmarshal

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

type BobService

type BobService interface {
	Dance(ctx context.Context, in *BobRequest, opts ...client.CallOption) (*BobResponse, error)
}

func NewBobService

func NewBobService(name string, c client.Client) BobService

Jump to

Keyboard shortcuts

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