Documentation ¶
Index ¶
- Constants
- func NewPublishServiceHandler(svc PublishServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- type PublishServiceClient
- type PublishServiceHandler
- type UnimplementedPublishServiceHandler
- func (UnimplementedPublishServiceHandler) Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error)
- func (UnimplementedPublishServiceHandler) PublishEvent(context.Context, *connect.Request[v11.PublishEventRequest]) (*connect.Response[v11.PublishEventResponse], error)
Constants ¶
const ( // PublishServicePingProcedure is the fully-qualified name of the PublishService's Ping RPC. PublishServicePingProcedure = "/xyz.block.ftl.publish.v1.PublishService/Ping" // PublishServicePublishEventProcedure is the fully-qualified name of the PublishService's // PublishEvent RPC. PublishServicePublishEventProcedure = "/xyz.block.ftl.publish.v1.PublishService/PublishEvent" )
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 (
// PublishServiceName is the fully-qualified name of the PublishService service.
PublishServiceName = "xyz.block.ftl.publish.v1.PublishService"
)
Variables ¶
This section is empty.
Functions ¶
func NewPublishServiceHandler ¶
func NewPublishServiceHandler(svc PublishServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewPublishServiceHandler 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 PublishServiceClient ¶
type PublishServiceClient interface { // Ping service for readiness. Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) // Publish a message to a topic. PublishEvent(context.Context, *connect.Request[v11.PublishEventRequest]) (*connect.Response[v11.PublishEventResponse], error) }
PublishServiceClient is a client for the xyz.block.ftl.publish.v1.PublishService service.
func NewPublishServiceClient ¶
func NewPublishServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) PublishServiceClient
NewPublishServiceClient constructs a client for the xyz.block.ftl.publish.v1.PublishService 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 PublishServiceHandler ¶
type PublishServiceHandler interface { // Ping service for readiness. Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) // Publish a message to a topic. PublishEvent(context.Context, *connect.Request[v11.PublishEventRequest]) (*connect.Response[v11.PublishEventResponse], error) }
PublishServiceHandler is an implementation of the xyz.block.ftl.publish.v1.PublishService service.
type UnimplementedPublishServiceHandler ¶
type UnimplementedPublishServiceHandler struct{}
UnimplementedPublishServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedPublishServiceHandler) Ping ¶
func (UnimplementedPublishServiceHandler) Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error)
func (UnimplementedPublishServiceHandler) PublishEvent ¶
func (UnimplementedPublishServiceHandler) PublishEvent(context.Context, *connect.Request[v11.PublishEventRequest]) (*connect.Response[v11.PublishEventResponse], error)