go_micro_server

package
v1.18.3-focal Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterServerHandler

func RegisterServerHandler(s server.Server, hdlr ServerHandler, opts ...server.HandlerOption) error

Types

type HandleRequest

type HandleRequest struct {
	Service              string   `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
	Endpoint             string   `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	Protocol             string   `protobuf:"bytes,3,opt,name=protocol,proto3" json:"protocol,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*HandleRequest) Descriptor

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

func (*HandleRequest) GetEndpoint

func (m *HandleRequest) GetEndpoint() string

func (*HandleRequest) GetProtocol

func (m *HandleRequest) GetProtocol() string

func (*HandleRequest) GetService

func (m *HandleRequest) GetService() string

func (*HandleRequest) ProtoMessage

func (*HandleRequest) ProtoMessage()

func (*HandleRequest) Reset

func (m *HandleRequest) Reset()

func (*HandleRequest) String

func (m *HandleRequest) String() string

func (*HandleRequest) XXX_DiscardUnknown

func (m *HandleRequest) XXX_DiscardUnknown()

func (*HandleRequest) XXX_Marshal

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

func (*HandleRequest) XXX_Merge

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

func (*HandleRequest) XXX_Size

func (m *HandleRequest) XXX_Size() int

func (*HandleRequest) XXX_Unmarshal

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

type HandleResponse

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

func (*HandleResponse) Descriptor

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

func (*HandleResponse) ProtoMessage

func (*HandleResponse) ProtoMessage()

func (*HandleResponse) Reset

func (m *HandleResponse) Reset()

func (*HandleResponse) String

func (m *HandleResponse) String() string

func (*HandleResponse) XXX_DiscardUnknown

func (m *HandleResponse) XXX_DiscardUnknown()

func (*HandleResponse) XXX_Marshal

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

func (*HandleResponse) XXX_Merge

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

func (*HandleResponse) XXX_Size

func (m *HandleResponse) XXX_Size() int

func (*HandleResponse) XXX_Unmarshal

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

type ServerHandler

type ServerHandler interface {
	Handle(context.Context, *HandleRequest, *HandleResponse) error
	Subscribe(context.Context, *SubscribeRequest, *SubscribeResponse) error
}

type ServerService

type ServerService interface {
	Handle(ctx context.Context, in *HandleRequest, opts ...client.CallOption) (*HandleResponse, error)
	Subscribe(ctx context.Context, in *SubscribeRequest, opts ...client.CallOption) (*SubscribeResponse, error)
}

func NewServerService

func NewServerService(name string, c client.Client) ServerService

type SubscribeRequest

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

func (*SubscribeRequest) Descriptor

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

func (*SubscribeRequest) GetTopic

func (m *SubscribeRequest) GetTopic() string

func (*SubscribeRequest) ProtoMessage

func (*SubscribeRequest) ProtoMessage()

func (*SubscribeRequest) Reset

func (m *SubscribeRequest) Reset()

func (*SubscribeRequest) String

func (m *SubscribeRequest) String() string

func (*SubscribeRequest) XXX_DiscardUnknown

func (m *SubscribeRequest) XXX_DiscardUnknown()

func (*SubscribeRequest) XXX_Marshal

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

func (*SubscribeRequest) XXX_Merge

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

func (*SubscribeRequest) XXX_Size

func (m *SubscribeRequest) XXX_Size() int

func (*SubscribeRequest) XXX_Unmarshal

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

type SubscribeResponse

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

func (*SubscribeResponse) Descriptor

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

func (*SubscribeResponse) ProtoMessage

func (*SubscribeResponse) ProtoMessage()

func (*SubscribeResponse) Reset

func (m *SubscribeResponse) Reset()

func (*SubscribeResponse) String

func (m *SubscribeResponse) String() string

func (*SubscribeResponse) XXX_DiscardUnknown

func (m *SubscribeResponse) XXX_DiscardUnknown()

func (*SubscribeResponse) XXX_Marshal

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

func (*SubscribeResponse) XXX_Merge

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

func (*SubscribeResponse) XXX_Size

func (m *SubscribeResponse) XXX_Size() int

func (*SubscribeResponse) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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