Documentation ¶
Index ¶
- Variables
- func RegisterServerDiscoveryServiceServer(s grpc.ServiceRegistrar, srv ServerDiscoveryServiceServer)
- type Server
- func (*Server) Descriptor() ([]byte, []int)deprecated
- func (x *Server) GetAddress() string
- func (x *Server) GetId() string
- func (x *Server) GetVersion() string
- func (msg *Server) MarshalBinary() ([]byte, error)
- func (*Server) ProtoMessage()
- func (x *Server) ProtoReflect() protoreflect.Message
- func (x *Server) Reset()
- func (x *Server) String() string
- func (msg *Server) UnmarshalBinary(b []byte) error
- type ServerDiscoveryServiceClient
- type ServerDiscoveryServiceServer
- type ServerDiscoveryService_WatchServersClient
- type ServerDiscoveryService_WatchServersServer
- type UnimplementedServerDiscoveryServiceServer
- type UnsafeServerDiscoveryServiceServer
- type WatchServersRequest
- func (*WatchServersRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WatchServersRequest) GetWan() bool
- func (msg *WatchServersRequest) MarshalBinary() ([]byte, error)
- func (*WatchServersRequest) ProtoMessage()
- func (x *WatchServersRequest) ProtoReflect() protoreflect.Message
- func (x *WatchServersRequest) Reset()
- func (x *WatchServersRequest) String() string
- func (msg *WatchServersRequest) UnmarshalBinary(b []byte) error
- type WatchServersResponse
- func (*WatchServersResponse) Descriptor() ([]byte, []int)deprecated
- func (x *WatchServersResponse) GetServers() []*Server
- func (msg *WatchServersResponse) MarshalBinary() ([]byte, error)
- func (*WatchServersResponse) ProtoMessage()
- func (x *WatchServersResponse) ProtoReflect() protoreflect.Message
- func (x *WatchServersResponse) Reset()
- func (x *WatchServersResponse) String() string
- func (msg *WatchServersResponse) UnmarshalBinary(b []byte) error
Constants ¶
This section is empty.
Variables ¶
var File_pbserverdiscovery_serverdiscovery_proto protoreflect.FileDescriptor
var ServerDiscoveryService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "hashicorp.consul.serverdiscovery.ServerDiscoveryService", HandlerType: (*ServerDiscoveryServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "WatchServers", Handler: _ServerDiscoveryService_WatchServers_Handler, ServerStreams: true, }, }, Metadata: "pbserverdiscovery/serverdiscovery.proto", }
ServerDiscoveryService_ServiceDesc is the grpc.ServiceDesc for ServerDiscoveryService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterServerDiscoveryServiceServer ¶
func RegisterServerDiscoveryServiceServer(s grpc.ServiceRegistrar, srv ServerDiscoveryServiceServer)
Types ¶
type Server ¶
type Server struct { // id is the unique string identifying this server for all time. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // address on the network of the server Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` // the consul version of the server Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` // contains filtered or unexported fields }
func (*Server) Descriptor
deprecated
func (*Server) GetAddress ¶
func (*Server) GetVersion ¶
func (*Server) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler
func (*Server) ProtoMessage ¶
func (*Server) ProtoMessage()
func (*Server) ProtoReflect ¶
func (x *Server) ProtoReflect() protoreflect.Message
func (*Server) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler
type ServerDiscoveryServiceClient ¶
type ServerDiscoveryServiceClient interface { // WatchServers will stream back sets of ready servers as they change such as // when new servers are added or older ones removed. A ready server is one that // should be considered ready for sending general RPC requests towards that would // catalog queries, xDS proxy configurations and similar services. WatchServers(ctx context.Context, in *WatchServersRequest, opts ...grpc.CallOption) (ServerDiscoveryService_WatchServersClient, error) }
ServerDiscoveryServiceClient is the client API for ServerDiscoveryService 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 NewServerDiscoveryServiceClient ¶
func NewServerDiscoveryServiceClient(cc grpc.ClientConnInterface) ServerDiscoveryServiceClient
type ServerDiscoveryServiceServer ¶
type ServerDiscoveryServiceServer interface { // WatchServers will stream back sets of ready servers as they change such as // when new servers are added or older ones removed. A ready server is one that // should be considered ready for sending general RPC requests towards that would // catalog queries, xDS proxy configurations and similar services. WatchServers(*WatchServersRequest, ServerDiscoveryService_WatchServersServer) error }
ServerDiscoveryServiceServer is the server API for ServerDiscoveryService service. All implementations should embed UnimplementedServerDiscoveryServiceServer for forward compatibility
type ServerDiscoveryService_WatchServersClient ¶
type ServerDiscoveryService_WatchServersClient interface { Recv() (*WatchServersResponse, error) grpc.ClientStream }
type ServerDiscoveryService_WatchServersServer ¶
type ServerDiscoveryService_WatchServersServer interface { Send(*WatchServersResponse) error grpc.ServerStream }
type UnimplementedServerDiscoveryServiceServer ¶
type UnimplementedServerDiscoveryServiceServer struct { }
UnimplementedServerDiscoveryServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedServerDiscoveryServiceServer) WatchServers ¶
type UnsafeServerDiscoveryServiceServer ¶
type UnsafeServerDiscoveryServiceServer interface {
// contains filtered or unexported methods
}
UnsafeServerDiscoveryServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServerDiscoveryServiceServer will result in compilation errors.
type WatchServersRequest ¶
type WatchServersRequest struct { // Wan being set to true will cause WAN addresses to be sent in the response // instead of the LAN addresses which are the default Wan bool `protobuf:"varint,1,opt,name=wan,proto3" json:"wan,omitempty"` // contains filtered or unexported fields }
func (*WatchServersRequest) Descriptor
deprecated
func (*WatchServersRequest) Descriptor() ([]byte, []int)
Deprecated: Use WatchServersRequest.ProtoReflect.Descriptor instead.
func (*WatchServersRequest) GetWan ¶
func (x *WatchServersRequest) GetWan() bool
func (*WatchServersRequest) MarshalBinary ¶
func (msg *WatchServersRequest) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler
func (*WatchServersRequest) ProtoMessage ¶
func (*WatchServersRequest) ProtoMessage()
func (*WatchServersRequest) ProtoReflect ¶
func (x *WatchServersRequest) ProtoReflect() protoreflect.Message
func (*WatchServersRequest) Reset ¶
func (x *WatchServersRequest) Reset()
func (*WatchServersRequest) String ¶
func (x *WatchServersRequest) String() string
func (*WatchServersRequest) UnmarshalBinary ¶
func (msg *WatchServersRequest) UnmarshalBinary(b []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler
type WatchServersResponse ¶
type WatchServersResponse struct { // Servers is the list of server address information. Servers []*Server `protobuf:"bytes,1,rep,name=servers,proto3" json:"servers,omitempty"` // contains filtered or unexported fields }
func (*WatchServersResponse) Descriptor
deprecated
func (*WatchServersResponse) Descriptor() ([]byte, []int)
Deprecated: Use WatchServersResponse.ProtoReflect.Descriptor instead.
func (*WatchServersResponse) GetServers ¶
func (x *WatchServersResponse) GetServers() []*Server
func (*WatchServersResponse) MarshalBinary ¶
func (msg *WatchServersResponse) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler
func (*WatchServersResponse) ProtoMessage ¶
func (*WatchServersResponse) ProtoMessage()
func (*WatchServersResponse) ProtoReflect ¶
func (x *WatchServersResponse) ProtoReflect() protoreflect.Message
func (*WatchServersResponse) Reset ¶
func (x *WatchServersResponse) Reset()
func (*WatchServersResponse) String ¶
func (x *WatchServersResponse) String() string
func (*WatchServersResponse) UnmarshalBinary ¶
func (msg *WatchServersResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler