Documentation ¶
Index ¶
- Constants
- func NewDaemonStreamServiceHandler(svc DaemonStreamServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- func NewHostServiceHandler(svc HostServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- type DaemonStreamServiceClient
- type DaemonStreamServiceHandler
- type HostServiceClient
- type HostServiceHandler
- type UnimplementedDaemonStreamServiceHandler
- type UnimplementedHostServiceHandler
Constants ¶
const ( // DaemonStreamServiceCommunicateProcedure is the fully-qualified name of the DaemonStreamService's // Communicate RPC. DaemonStreamServiceCommunicateProcedure = "/platform.daemon.v1.DaemonStreamService/Communicate" )
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 (
// DaemonStreamServiceName is the fully-qualified name of the DaemonStreamService service.
DaemonStreamServiceName = "platform.daemon.v1.DaemonStreamService"
)
const (
// HostServiceName is the fully-qualified name of the HostService service.
HostServiceName = "platform.daemon.v1.HostService"
)
const ( // HostServiceShutdownAlertProcedure is the fully-qualified name of the HostService's ShutdownAlert // RPC. HostServiceShutdownAlertProcedure = "/platform.daemon.v1.HostService/ShutdownAlert" )
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.
Variables ¶
This section is empty.
Functions ¶
func NewDaemonStreamServiceHandler ¶
func NewDaemonStreamServiceHandler(svc DaemonStreamServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewDaemonStreamServiceHandler 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.
func NewHostServiceHandler ¶ added in v0.2.0
func NewHostServiceHandler(svc HostServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewHostServiceHandler 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 DaemonStreamServiceClient ¶
type DaemonStreamServiceClient interface {
Communicate(context.Context) *connect.BidiStreamForClient[v1.DaemonMessage, v1.ServerMessage]
}
DaemonStreamServiceClient is a client for the platform.daemon.v1.DaemonStreamService service.
func NewDaemonStreamServiceClient ¶
func NewDaemonStreamServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) DaemonStreamServiceClient
NewDaemonStreamServiceClient constructs a client for the platform.daemon.v1.DaemonStreamService 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 DaemonStreamServiceHandler ¶
type DaemonStreamServiceHandler interface {
Communicate(context.Context, *connect.BidiStream[v1.DaemonMessage, v1.ServerMessage]) error
}
DaemonStreamServiceHandler is an implementation of the platform.daemon.v1.DaemonStreamService service.
type HostServiceClient ¶ added in v0.2.0
type HostServiceClient interface {
ShutdownAlert(context.Context, *connect.Request[v1.ShutdownAlertRequest]) (*connect.Response[v1.ShutdownAlertResponse], error)
}
HostServiceClient is a client for the platform.daemon.v1.HostService service.
func NewHostServiceClient ¶ added in v0.2.0
func NewHostServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) HostServiceClient
NewHostServiceClient constructs a client for the platform.daemon.v1.HostService 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 HostServiceHandler ¶ added in v0.2.0
type HostServiceHandler interface {
ShutdownAlert(context.Context, *connect.Request[v1.ShutdownAlertRequest]) (*connect.Response[v1.ShutdownAlertResponse], error)
}
HostServiceHandler is an implementation of the platform.daemon.v1.HostService service.
type UnimplementedDaemonStreamServiceHandler ¶
type UnimplementedDaemonStreamServiceHandler struct{}
UnimplementedDaemonStreamServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedDaemonStreamServiceHandler) Communicate ¶
func (UnimplementedDaemonStreamServiceHandler) Communicate(context.Context, *connect.BidiStream[v1.DaemonMessage, v1.ServerMessage]) error
type UnimplementedHostServiceHandler ¶ added in v0.2.0
type UnimplementedHostServiceHandler struct{}
UnimplementedHostServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedHostServiceHandler) ShutdownAlert ¶ added in v0.2.0
func (UnimplementedHostServiceHandler) ShutdownAlert(context.Context, *connect.Request[v1.ShutdownAlertRequest]) (*connect.Response[v1.ShutdownAlertResponse], error)