api

package module
v0.0.0-...-be62643 Latest Latest
Warning

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

Go to latest
Published: May 27, 2021 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_api_router_proto protoreflect.FileDescriptor
View Source
var RouterService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.RouterService",
	HandlerType: (*RouterServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetService",
			Handler:    _RouterService_GetService_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/router.proto",
}

RouterService_ServiceDesc is the grpc.ServiceDesc for RouterService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterRouterServiceServer

func RegisterRouterServiceServer(s grpc.ServiceRegistrar, srv RouterServiceServer)

Types

type RouteRequest

type RouteRequest struct {
	ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"`
	RemoteAddr  string `protobuf:"bytes,2,opt,name=remote_addr,json=remoteAddr,proto3" json:"remote_addr,omitempty"`
	// contains filtered or unexported fields
}

func (*RouteRequest) Descriptor deprecated

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

Deprecated: Use RouteRequest.ProtoReflect.Descriptor instead.

func (*RouteRequest) GetRemoteAddr

func (x *RouteRequest) GetRemoteAddr() string

func (*RouteRequest) GetServiceName

func (x *RouteRequest) GetServiceName() string

func (*RouteRequest) ProtoMessage

func (*RouteRequest) ProtoMessage()

func (*RouteRequest) ProtoReflect

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

func (*RouteRequest) Reset

func (x *RouteRequest) Reset()

func (*RouteRequest) String

func (x *RouteRequest) String() string

type RouteResponse

type RouteResponse struct {
	Ip   string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
	Port int32  `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	// contains filtered or unexported fields
}

func (*RouteResponse) Descriptor deprecated

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

Deprecated: Use RouteResponse.ProtoReflect.Descriptor instead.

func (*RouteResponse) GetIp

func (x *RouteResponse) GetIp() string

func (*RouteResponse) GetPort

func (x *RouteResponse) GetPort() int32

func (*RouteResponse) ProtoMessage

func (*RouteResponse) ProtoMessage()

func (*RouteResponse) ProtoReflect

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

func (*RouteResponse) Reset

func (x *RouteResponse) Reset()

func (*RouteResponse) String

func (x *RouteResponse) String() string

type RouterServiceClient

type RouterServiceClient interface {
	GetService(ctx context.Context, in *RouteRequest, opts ...grpc.CallOption) (*RouteResponse, error)
}

RouterServiceClient is the client API for RouterService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type RouterServiceServer

type RouterServiceServer interface {
	GetService(context.Context, *RouteRequest) (*RouteResponse, error)
	// contains filtered or unexported methods
}

RouterServiceServer is the server API for RouterService service. All implementations must embed UnimplementedRouterServiceServer for forward compatibility

type UnimplementedRouterServiceServer

type UnimplementedRouterServiceServer struct {
}

UnimplementedRouterServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedRouterServiceServer) GetService

type UnsafeRouterServiceServer

type UnsafeRouterServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeRouterServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RouterServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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