miniresolverproto

package
v2.0.31 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MiniResolver_Ping_FullMethodName            = "/miniresolverproto.MiniResolver/Ping"
	MiniResolver_AddService_FullMethodName      = "/miniresolverproto.MiniResolver/AddService"
	MiniResolver_RemoveService_FullMethodName   = "/miniresolverproto.MiniResolver/RemoveService"
	MiniResolver_ResolveService_FullMethodName  = "/miniresolverproto.MiniResolver/ResolveService"
	MiniResolver_ResolveServices_FullMethodName = "/miniresolverproto.MiniResolver/ResolveServices"
)

Variables

View Source
var File_service_proto protoreflect.FileDescriptor
View Source
var MiniResolver_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "miniresolverproto.MiniResolver",
	HandlerType: (*MiniResolverServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Ping",
			Handler:    _MiniResolver_Ping_Handler,
		},
		{
			MethodName: "AddService",
			Handler:    _MiniResolver_AddService_Handler,
		},
		{
			MethodName: "RemoveService",
			Handler:    _MiniResolver_RemoveService_Handler,
		},
		{
			MethodName: "ResolveService",
			Handler:    _MiniResolver_ResolveService_Handler,
		},
		{
			MethodName: "ResolveServices",
			Handler:    _MiniResolver_ResolveServices_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "service.proto",
}

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

Functions

func RegisterMiniResolverServer

func RegisterMiniResolverServer(s grpc.ServiceRegistrar, srv MiniResolverServer)

Types

type MiniResolverClient

type MiniResolverClient interface {
	Ping(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*proto.DefaultResponse, error)
	AddService(ctx context.Context, in *ServiceData, opts ...grpc.CallOption) (*ResolverDefaultResponse, error)
	RemoveService(ctx context.Context, in *ServiceData, opts ...grpc.CallOption) (*proto.DefaultResponse, error)
	ResolveService(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*ServiceResponse, error)
	ResolveServices(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*ServicesResponse, error)
}

MiniResolverClient is the client API for MiniResolver 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.

func NewMiniResolverClient

func NewMiniResolverClient(cc grpc.ClientConnInterface) MiniResolverClient

type MiniResolverServer

type MiniResolverServer interface {
	Ping(context.Context, *emptypb.Empty) (*proto.DefaultResponse, error)
	AddService(context.Context, *ServiceData) (*ResolverDefaultResponse, error)
	RemoveService(context.Context, *ServiceData) (*proto.DefaultResponse, error)
	ResolveService(context.Context, *wrapperspb.StringValue) (*ServiceResponse, error)
	ResolveServices(context.Context, *wrapperspb.StringValue) (*ServicesResponse, error)
	// contains filtered or unexported methods
}

MiniResolverServer is the server API for MiniResolver service. All implementations must embed UnimplementedMiniResolverServer for forward compatibility

type ResolverDefaultResponse

type ResolverDefaultResponse struct {
	Response     *proto.DefaultResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
	NextCallWait int64                  `protobuf:"varint,4,opt,name=nextCallWait,proto3" json:"nextCallWait,omitempty"`
	// contains filtered or unexported fields
}

func (*ResolverDefaultResponse) Descriptor deprecated

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

Deprecated: Use ResolverDefaultResponse.ProtoReflect.Descriptor instead.

func (*ResolverDefaultResponse) GetNextCallWait

func (x *ResolverDefaultResponse) GetNextCallWait() int64

func (*ResolverDefaultResponse) GetResponse

func (x *ResolverDefaultResponse) GetResponse() *proto.DefaultResponse

func (*ResolverDefaultResponse) ProtoMessage

func (*ResolverDefaultResponse) ProtoMessage()

func (*ResolverDefaultResponse) ProtoReflect

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

func (*ResolverDefaultResponse) Reset

func (x *ResolverDefaultResponse) Reset()

func (*ResolverDefaultResponse) String

func (x *ResolverDefaultResponse) String() string

type ServiceData

type ServiceData struct {
	Service string   `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
	Host    *string  `protobuf:"bytes,2,opt,name=host,proto3,oneof" json:"host,omitempty"`
	Port    uint32   `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"`
	Domains []string `protobuf:"bytes,4,rep,name=domains,proto3" json:"domains,omitempty"`
	Single  bool     `protobuf:"varint,5,opt,name=single,proto3" json:"single,omitempty"`
	// contains filtered or unexported fields
}

func (*ServiceData) Descriptor deprecated

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

Deprecated: Use ServiceData.ProtoReflect.Descriptor instead.

func (*ServiceData) GetDomains

func (x *ServiceData) GetDomains() []string

func (*ServiceData) GetHost

func (x *ServiceData) GetHost() string

func (*ServiceData) GetPort

func (x *ServiceData) GetPort() uint32

func (*ServiceData) GetService

func (x *ServiceData) GetService() string

func (*ServiceData) GetSingle

func (x *ServiceData) GetSingle() bool

func (*ServiceData) ProtoMessage

func (*ServiceData) ProtoMessage()

func (*ServiceData) ProtoReflect

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

func (*ServiceData) Reset

func (x *ServiceData) Reset()

func (*ServiceData) String

func (x *ServiceData) String() string

type ServiceResponse

type ServiceResponse struct {
	Addr         string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
	NextCallWait int64  `protobuf:"varint,4,opt,name=nextCallWait,proto3" json:"nextCallWait,omitempty"`
	// contains filtered or unexported fields
}

func (*ServiceResponse) Descriptor deprecated

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

Deprecated: Use ServiceResponse.ProtoReflect.Descriptor instead.

func (*ServiceResponse) GetAddr

func (x *ServiceResponse) GetAddr() string

func (*ServiceResponse) GetNextCallWait

func (x *ServiceResponse) GetNextCallWait() int64

func (*ServiceResponse) ProtoMessage

func (*ServiceResponse) ProtoMessage()

func (*ServiceResponse) ProtoReflect

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

func (*ServiceResponse) Reset

func (x *ServiceResponse) Reset()

func (*ServiceResponse) String

func (x *ServiceResponse) String() string

type ServicesResponse

type ServicesResponse struct {
	Addrs        []string `protobuf:"bytes,1,rep,name=addrs,proto3" json:"addrs,omitempty"`
	NextCallWait int64    `protobuf:"varint,4,opt,name=nextCallWait,proto3" json:"nextCallWait,omitempty"`
	// contains filtered or unexported fields
}

func (*ServicesResponse) Descriptor deprecated

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

Deprecated: Use ServicesResponse.ProtoReflect.Descriptor instead.

func (*ServicesResponse) GetAddrs

func (x *ServicesResponse) GetAddrs() []string

func (*ServicesResponse) GetNextCallWait

func (x *ServicesResponse) GetNextCallWait() int64

func (*ServicesResponse) ProtoMessage

func (*ServicesResponse) ProtoMessage()

func (*ServicesResponse) ProtoReflect

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

func (*ServicesResponse) Reset

func (x *ServicesResponse) Reset()

func (*ServicesResponse) String

func (x *ServicesResponse) String() string

type UnimplementedMiniResolverServer

type UnimplementedMiniResolverServer struct {
}

UnimplementedMiniResolverServer must be embedded to have forward compatible implementations.

func (UnimplementedMiniResolverServer) AddService

func (UnimplementedMiniResolverServer) Ping

func (UnimplementedMiniResolverServer) RemoveService

func (UnimplementedMiniResolverServer) ResolveService

func (UnimplementedMiniResolverServer) ResolveServices

type UnsafeMiniResolverServer

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

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

Jump to

Keyboard shortcuts

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