Documentation ¶
Index ¶
- Constants
- func NewServiceDiscoveryServiceHandler(svc ServiceDiscoveryServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- type ServiceDiscoveryServiceClient
- type ServiceDiscoveryServiceHandler
- type UnimplementedServiceDiscoveryServiceHandler
- func (UnimplementedServiceDiscoveryServiceHandler) Finalize(context.Context, *connect.Request[v1.FinalizeRequest]) (*connect.Response[v1.FinalizeResponse], error)
- func (UnimplementedServiceDiscoveryServiceHandler) Initialize(context.Context, *connect.Request[v1.InitializeRequest]) (*connect.Response[v1.InitializeResponse], error)
- func (UnimplementedServiceDiscoveryServiceHandler) Query(context.Context, *connect.Request[v1.QueryRequest]) (*connect.Response[v1.QueryResponse], error)
- func (UnimplementedServiceDiscoveryServiceHandler) ReportHealth(context.Context, *connect.Request[v1.ReportHealthRequest]) (*connect.Response[v1.ReportHealthResponse], error)
- func (UnimplementedServiceDiscoveryServiceHandler) Synchronize(context.Context, *connect.ClientStream[v1.ClientDetails]) (*connect.Response[v1.Empty], error)
Constants ¶
const ( // ServiceDiscoveryServiceInitializeProcedure is the fully-qualified name of the // ServiceDiscoveryService's Initialize RPC. ServiceDiscoveryServiceInitializeProcedure = "/core.registry.service_discovery.v1.ServiceDiscoveryService/Initialize" // ServiceDiscoveryServiceSynchronizeProcedure is the fully-qualified name of the // ServiceDiscoveryService's Synchronize RPC. ServiceDiscoveryServiceSynchronizeProcedure = "/core.registry.service_discovery.v1.ServiceDiscoveryService/Synchronize" // ServiceDiscoveryServiceFinalizeProcedure is the fully-qualified name of the // ServiceDiscoveryService's Finalize RPC. ServiceDiscoveryServiceFinalizeProcedure = "/core.registry.service_discovery.v1.ServiceDiscoveryService/Finalize" // ServiceDiscoveryServiceReportHealthProcedure is the fully-qualified name of the // ServiceDiscoveryService's ReportHealth RPC. ServiceDiscoveryServiceReportHealthProcedure = "/core.registry.service_discovery.v1.ServiceDiscoveryService/ReportHealth" // ServiceDiscoveryServiceQueryProcedure is the fully-qualified name of the // ServiceDiscoveryService's Query RPC. ServiceDiscoveryServiceQueryProcedure = "/core.registry.service_discovery.v1.ServiceDiscoveryService/Query" )
These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.
const (
// ServiceDiscoveryServiceName is the fully-qualified name of the ServiceDiscoveryService service.
ServiceDiscoveryServiceName = "core.registry.service_discovery.v1.ServiceDiscoveryService"
)
Variables ¶
This section is empty.
Functions ¶
func NewServiceDiscoveryServiceHandler ¶
func NewServiceDiscoveryServiceHandler(svc ServiceDiscoveryServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewServiceDiscoveryServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.
By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.
Types ¶
type ServiceDiscoveryServiceClient ¶
type ServiceDiscoveryServiceClient interface { // Initialize the registeration of the process to the registry Initialize(context.Context, *connect.Request[v1.InitializeRequest]) (*connect.Response[v1.InitializeResponse], error) // synchronize the client state with the registry Synchronize(context.Context) *connect.ClientStreamForClient[v1.ClientDetails, v1.Empty] // Gracefully shutdown and `Finalize` the connection of the process to the registry Finalize(context.Context, *connect.Request[v1.FinalizeRequest]) (*connect.Response[v1.FinalizeResponse], error) // Let a follower draft node report health information on the processes it's responsible for checking the health status of ReportHealth(context.Context, *connect.Request[v1.ReportHealthRequest]) (*connect.Response[v1.ReportHealthResponse], error) // Query the registry Query(context.Context, *connect.Request[v1.QueryRequest]) (*connect.Response[v1.QueryResponse], error) }
ServiceDiscoveryServiceClient is a client for the core.registry.service_discovery.v1.ServiceDiscoveryService service.
func NewServiceDiscoveryServiceClient ¶
func NewServiceDiscoveryServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ServiceDiscoveryServiceClient
NewServiceDiscoveryServiceClient constructs a client for the core.registry.service_discovery.v1.ServiceDiscoveryService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.
The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).
type ServiceDiscoveryServiceHandler ¶
type ServiceDiscoveryServiceHandler interface { // Initialize the registeration of the process to the registry Initialize(context.Context, *connect.Request[v1.InitializeRequest]) (*connect.Response[v1.InitializeResponse], error) // synchronize the client state with the registry Synchronize(context.Context, *connect.ClientStream[v1.ClientDetails]) (*connect.Response[v1.Empty], error) // Gracefully shutdown and `Finalize` the connection of the process to the registry Finalize(context.Context, *connect.Request[v1.FinalizeRequest]) (*connect.Response[v1.FinalizeResponse], error) // Let a follower draft node report health information on the processes it's responsible for checking the health status of ReportHealth(context.Context, *connect.Request[v1.ReportHealthRequest]) (*connect.Response[v1.ReportHealthResponse], error) // Query the registry Query(context.Context, *connect.Request[v1.QueryRequest]) (*connect.Response[v1.QueryResponse], error) }
ServiceDiscoveryServiceHandler is an implementation of the core.registry.service_discovery.v1.ServiceDiscoveryService service.
type UnimplementedServiceDiscoveryServiceHandler ¶
type UnimplementedServiceDiscoveryServiceHandler struct{}
UnimplementedServiceDiscoveryServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedServiceDiscoveryServiceHandler) Finalize ¶
func (UnimplementedServiceDiscoveryServiceHandler) Finalize(context.Context, *connect.Request[v1.FinalizeRequest]) (*connect.Response[v1.FinalizeResponse], error)
func (UnimplementedServiceDiscoveryServiceHandler) Initialize ¶
func (UnimplementedServiceDiscoveryServiceHandler) Initialize(context.Context, *connect.Request[v1.InitializeRequest]) (*connect.Response[v1.InitializeResponse], error)
func (UnimplementedServiceDiscoveryServiceHandler) Query ¶
func (UnimplementedServiceDiscoveryServiceHandler) Query(context.Context, *connect.Request[v1.QueryRequest]) (*connect.Response[v1.QueryResponse], error)
func (UnimplementedServiceDiscoveryServiceHandler) ReportHealth ¶
func (UnimplementedServiceDiscoveryServiceHandler) ReportHealth(context.Context, *connect.Request[v1.ReportHealthRequest]) (*connect.Response[v1.ReportHealthResponse], error)
func (UnimplementedServiceDiscoveryServiceHandler) Synchronize ¶
func (UnimplementedServiceDiscoveryServiceHandler) Synchronize(context.Context, *connect.ClientStream[v1.ClientDetails]) (*connect.Response[v1.Empty], error)