pubsubpbconnect

package
v0.423.1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PubSubAdminServicePingProcedure is the fully-qualified name of the PubSubAdminService's Ping RPC.
	PubSubAdminServicePingProcedure = "/xyz.block.ftl.pubsub.v1.PubSubAdminService/Ping"
	// PubSubAdminServiceResetOffsetsOfSubscriptionProcedure is the fully-qualified name of the
	// PubSubAdminService's ResetOffsetsOfSubscription RPC.
	PubSubAdminServiceResetOffsetsOfSubscriptionProcedure = "/xyz.block.ftl.pubsub.v1.PubSubAdminService/ResetOffsetsOfSubscription"
)

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.

View Source
const (
	// PublishServicePingProcedure is the fully-qualified name of the PublishService's Ping RPC.
	PublishServicePingProcedure = "/xyz.block.ftl.pubsub.v1.PublishService/Ping"
	// PublishServicePublishEventProcedure is the fully-qualified name of the PublishService's
	// PublishEvent RPC.
	PublishServicePublishEventProcedure = "/xyz.block.ftl.pubsub.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.

View Source
const (
	// PubSubAdminServiceName is the fully-qualified name of the PubSubAdminService service.
	PubSubAdminServiceName = "xyz.block.ftl.pubsub.v1.PubSubAdminService"
)
View Source
const (
	// PublishServiceName is the fully-qualified name of the PublishService service.
	PublishServiceName = "xyz.block.ftl.pubsub.v1.PublishService"
)

Variables

This section is empty.

Functions

func NewPubSubAdminServiceHandler

func NewPubSubAdminServiceHandler(svc PubSubAdminServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewPubSubAdminServiceHandler 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 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 PubSubAdminServiceClient

type PubSubAdminServiceClient interface {
	// Ping service for readiness.
	Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error)
	// Reset the offset for a subscription to the latest of each claimed partition.
	// If the receiver does not currently claim any partitions for a consumer group, then an empty response is returned.
	ResetOffsetsOfSubscription(context.Context, *connect.Request[v11.ResetOffsetsOfSubscriptionRequest]) (*connect.Response[v11.ResetOffsetsOfSubscriptionResponse], error)
}

PubSubAdminServiceClient is a client for the xyz.block.ftl.pubsub.v1.PubSubAdminService service.

func NewPubSubAdminServiceClient

func NewPubSubAdminServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) PubSubAdminServiceClient

NewPubSubAdminServiceClient constructs a client for the xyz.block.ftl.pubsub.v1.PubSubAdminService 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 PubSubAdminServiceHandler

type PubSubAdminServiceHandler interface {
	// Ping service for readiness.
	Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error)
	// Reset the offset for a subscription to the latest of each claimed partition.
	// If the receiver does not currently claim any partitions for a consumer group, then an empty response is returned.
	ResetOffsetsOfSubscription(context.Context, *connect.Request[v11.ResetOffsetsOfSubscriptionRequest]) (*connect.Response[v11.ResetOffsetsOfSubscriptionResponse], error)
}

PubSubAdminServiceHandler is an implementation of the xyz.block.ftl.pubsub.v1.PubSubAdminService service.

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.pubsub.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.pubsub.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.pubsub.v1.PublishService service.

type UnimplementedPubSubAdminServiceHandler

type UnimplementedPubSubAdminServiceHandler struct{}

UnimplementedPubSubAdminServiceHandler returns CodeUnimplemented from all methods.

func (UnimplementedPubSubAdminServiceHandler) Ping

type UnimplementedPublishServiceHandler

type UnimplementedPublishServiceHandler struct{}

UnimplementedPublishServiceHandler returns CodeUnimplemented from all methods.

func (UnimplementedPublishServiceHandler) Ping

Jump to

Keyboard shortcuts

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