go_micro_server

package
v2.10.1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2021 License: Apache-2.0 Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_server_proto_server_proto protoreflect.FileDescriptor

Functions

func NewServerEndpoints

func NewServerEndpoints() []*api.Endpoint

func RegisterServerHandler

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

func RegisterServerServer

func RegisterServerServer(s *grpc.Server, srv ServerServer)

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"`
	// contains filtered or unexported fields
}

func (*HandleRequest) Descriptor deprecated

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

Deprecated: Use HandleRequest.ProtoReflect.Descriptor instead.

func (*HandleRequest) GetEndpoint

func (x *HandleRequest) GetEndpoint() string

func (*HandleRequest) GetProtocol

func (x *HandleRequest) GetProtocol() string

func (*HandleRequest) GetService

func (x *HandleRequest) GetService() string

func (*HandleRequest) ProtoMessage

func (*HandleRequest) ProtoMessage()

func (*HandleRequest) ProtoReflect

func (x *HandleRequest) ProtoReflect() protoreflect.Message

func (*HandleRequest) Reset

func (x *HandleRequest) Reset()

func (*HandleRequest) String

func (x *HandleRequest) String() string

type HandleResponse

type HandleResponse struct {
	// contains filtered or unexported fields
}

func (*HandleResponse) Descriptor deprecated

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

Deprecated: Use HandleResponse.ProtoReflect.Descriptor instead.

func (*HandleResponse) ProtoMessage

func (*HandleResponse) ProtoMessage()

func (*HandleResponse) ProtoReflect

func (x *HandleResponse) ProtoReflect() protoreflect.Message

func (*HandleResponse) Reset

func (x *HandleResponse) Reset()

func (*HandleResponse) String

func (x *HandleResponse) String() string

type ServerClient

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

ServerClient is the client API for Server service.

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

func NewServerClient

func NewServerClient(cc grpc.ClientConnInterface) ServerClient

type ServerHandler

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

type ServerServer

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

ServerServer is the server API for Server service.

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"`
	// contains filtered or unexported fields
}

func (*SubscribeRequest) Descriptor deprecated

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

Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead.

func (*SubscribeRequest) GetTopic

func (x *SubscribeRequest) GetTopic() string

func (*SubscribeRequest) ProtoMessage

func (*SubscribeRequest) ProtoMessage()

func (*SubscribeRequest) ProtoReflect

func (x *SubscribeRequest) ProtoReflect() protoreflect.Message

func (*SubscribeRequest) Reset

func (x *SubscribeRequest) Reset()

func (*SubscribeRequest) String

func (x *SubscribeRequest) String() string

type SubscribeResponse

type SubscribeResponse struct {
	// contains filtered or unexported fields
}

func (*SubscribeResponse) Descriptor deprecated

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

Deprecated: Use SubscribeResponse.ProtoReflect.Descriptor instead.

func (*SubscribeResponse) ProtoMessage

func (*SubscribeResponse) ProtoMessage()

func (*SubscribeResponse) ProtoReflect

func (x *SubscribeResponse) ProtoReflect() protoreflect.Message

func (*SubscribeResponse) Reset

func (x *SubscribeResponse) Reset()

func (*SubscribeResponse) String

func (x *SubscribeResponse) String() string

type UnimplementedServerServer

type UnimplementedServerServer struct {
}

UnimplementedServerServer can be embedded to have forward compatible implementations.

func (*UnimplementedServerServer) Handle

func (*UnimplementedServerServer) Subscribe

Jump to

Keyboard shortcuts

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