Documentation
¶
Index ¶
- Constants
- func NewOperatorHandler(svc OperatorHandler, opts ...connect.HandlerOption) (string, http.Handler)
- type OperatorClient
- type OperatorHandler
- type UnimplementedOperatorHandler
- func (UnimplementedOperatorHandler) ComponentUpdate(context.Context, *connect.Request[v1.ComponentUpdateRequest], ...) error
- func (UnimplementedOperatorHandler) GetConfiguration(context.Context, *connect.Request[v1.GetConfigurationRequest]) (*connect.Response[v1.GetConfigurationResponse], error)
- func (UnimplementedOperatorHandler) GetResiliency(context.Context, *connect.Request[v1.GetResiliencyRequest]) (*connect.Response[v1.GetResiliencyResponse], error)
- func (UnimplementedOperatorHandler) HTTPEndpointUpdate(context.Context, *connect.Request[v1.HTTPEndpointUpdateRequest], ...) error
- func (UnimplementedOperatorHandler) ListComponents(context.Context, *connect.Request[v1.ListComponentsRequest]) (*connect.Response[v1.ListComponentResponse], error)
- func (UnimplementedOperatorHandler) ListHTTPEndpoints(context.Context, *connect.Request[v1.ListHTTPEndpointsRequest]) (*connect.Response[v1.ListHTTPEndpointsResponse], error)
- func (UnimplementedOperatorHandler) ListResiliency(context.Context, *connect.Request[v1.ListResiliencyRequest]) (*connect.Response[v1.ListResiliencyResponse], error)
- func (UnimplementedOperatorHandler) ListSubscriptions(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.ListSubscriptionsResponse], error)
- func (UnimplementedOperatorHandler) ListSubscriptionsV2(context.Context, *connect.Request[v1.ListSubscriptionsRequest]) (*connect.Response[v1.ListSubscriptionsResponse], error)
- func (UnimplementedOperatorHandler) SubscriptionUpdate(context.Context, *connect.Request[v1.SubscriptionUpdateRequest], ...) error
Constants ¶
const ( // OperatorComponentUpdateProcedure is the fully-qualified name of the Operator's ComponentUpdate // RPC. OperatorComponentUpdateProcedure = "/dapr.proto.operator.v1.Operator/ComponentUpdate" // OperatorListComponentsProcedure is the fully-qualified name of the Operator's ListComponents RPC. OperatorListComponentsProcedure = "/dapr.proto.operator.v1.Operator/ListComponents" // OperatorGetConfigurationProcedure is the fully-qualified name of the Operator's GetConfiguration // RPC. OperatorGetConfigurationProcedure = "/dapr.proto.operator.v1.Operator/GetConfiguration" // OperatorListSubscriptionsProcedure is the fully-qualified name of the Operator's // ListSubscriptions RPC. OperatorListSubscriptionsProcedure = "/dapr.proto.operator.v1.Operator/ListSubscriptions" // OperatorGetResiliencyProcedure is the fully-qualified name of the Operator's GetResiliency RPC. OperatorGetResiliencyProcedure = "/dapr.proto.operator.v1.Operator/GetResiliency" // OperatorListResiliencyProcedure is the fully-qualified name of the Operator's ListResiliency RPC. OperatorListResiliencyProcedure = "/dapr.proto.operator.v1.Operator/ListResiliency" // OperatorListSubscriptionsV2Procedure is the fully-qualified name of the Operator's // ListSubscriptionsV2 RPC. OperatorListSubscriptionsV2Procedure = "/dapr.proto.operator.v1.Operator/ListSubscriptionsV2" // OperatorSubscriptionUpdateProcedure is the fully-qualified name of the Operator's // SubscriptionUpdate RPC. OperatorSubscriptionUpdateProcedure = "/dapr.proto.operator.v1.Operator/SubscriptionUpdate" // OperatorListHTTPEndpointsProcedure is the fully-qualified name of the Operator's // ListHTTPEndpoints RPC. OperatorListHTTPEndpointsProcedure = "/dapr.proto.operator.v1.Operator/ListHTTPEndpoints" // OperatorHTTPEndpointUpdateProcedure is the fully-qualified name of the Operator's // HTTPEndpointUpdate RPC. OperatorHTTPEndpointUpdateProcedure = "/dapr.proto.operator.v1.Operator/HTTPEndpointUpdate" )
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 (
// OperatorName is the fully-qualified name of the Operator service.
OperatorName = "dapr.proto.operator.v1.Operator"
)
Variables ¶
This section is empty.
Functions ¶
func NewOperatorHandler ¶
func NewOperatorHandler(svc OperatorHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewOperatorHandler 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 OperatorClient ¶
type OperatorClient interface {
// Sends events to Dapr sidecars upon component changes.
ComponentUpdate(context.Context, *connect.Request[v1.ComponentUpdateRequest]) (*connect.ServerStreamForClient[v1.ComponentUpdateEvent], error)
// Returns a list of available components
ListComponents(context.Context, *connect.Request[v1.ListComponentsRequest]) (*connect.Response[v1.ListComponentResponse], error)
// Returns a given configuration by name
GetConfiguration(context.Context, *connect.Request[v1.GetConfigurationRequest]) (*connect.Response[v1.GetConfigurationResponse], error)
// Returns a list of pub/sub subscriptions
ListSubscriptions(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.ListSubscriptionsResponse], error)
// Returns a given resiliency configuration by name
GetResiliency(context.Context, *connect.Request[v1.GetResiliencyRequest]) (*connect.Response[v1.GetResiliencyResponse], error)
// Returns a list of resiliency configurations
ListResiliency(context.Context, *connect.Request[v1.ListResiliencyRequest]) (*connect.Response[v1.ListResiliencyResponse], error)
// Returns a list of pub/sub subscriptions, ListSubscriptionsRequest to expose pod info
ListSubscriptionsV2(context.Context, *connect.Request[v1.ListSubscriptionsRequest]) (*connect.Response[v1.ListSubscriptionsResponse], error)
// Sends events to Dapr sidecars upon subscription changes.
SubscriptionUpdate(context.Context, *connect.Request[v1.SubscriptionUpdateRequest]) (*connect.ServerStreamForClient[v1.SubscriptionUpdateEvent], error)
// Returns a list of http endpoints
ListHTTPEndpoints(context.Context, *connect.Request[v1.ListHTTPEndpointsRequest]) (*connect.Response[v1.ListHTTPEndpointsResponse], error)
// Sends events to Dapr sidecars upon http endpoint changes.
HTTPEndpointUpdate(context.Context, *connect.Request[v1.HTTPEndpointUpdateRequest]) (*connect.ServerStreamForClient[v1.HTTPEndpointUpdateEvent], error)
}
OperatorClient is a client for the dapr.proto.operator.v1.Operator service.
func NewOperatorClient ¶
func NewOperatorClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) OperatorClient
NewOperatorClient constructs a client for the dapr.proto.operator.v1.Operator 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 OperatorHandler ¶
type OperatorHandler interface {
// Sends events to Dapr sidecars upon component changes.
ComponentUpdate(context.Context, *connect.Request[v1.ComponentUpdateRequest], *connect.ServerStream[v1.ComponentUpdateEvent]) error
// Returns a list of available components
ListComponents(context.Context, *connect.Request[v1.ListComponentsRequest]) (*connect.Response[v1.ListComponentResponse], error)
// Returns a given configuration by name
GetConfiguration(context.Context, *connect.Request[v1.GetConfigurationRequest]) (*connect.Response[v1.GetConfigurationResponse], error)
// Returns a list of pub/sub subscriptions
ListSubscriptions(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.ListSubscriptionsResponse], error)
// Returns a given resiliency configuration by name
GetResiliency(context.Context, *connect.Request[v1.GetResiliencyRequest]) (*connect.Response[v1.GetResiliencyResponse], error)
// Returns a list of resiliency configurations
ListResiliency(context.Context, *connect.Request[v1.ListResiliencyRequest]) (*connect.Response[v1.ListResiliencyResponse], error)
// Returns a list of pub/sub subscriptions, ListSubscriptionsRequest to expose pod info
ListSubscriptionsV2(context.Context, *connect.Request[v1.ListSubscriptionsRequest]) (*connect.Response[v1.ListSubscriptionsResponse], error)
// Sends events to Dapr sidecars upon subscription changes.
SubscriptionUpdate(context.Context, *connect.Request[v1.SubscriptionUpdateRequest], *connect.ServerStream[v1.SubscriptionUpdateEvent]) error
// Returns a list of http endpoints
ListHTTPEndpoints(context.Context, *connect.Request[v1.ListHTTPEndpointsRequest]) (*connect.Response[v1.ListHTTPEndpointsResponse], error)
// Sends events to Dapr sidecars upon http endpoint changes.
HTTPEndpointUpdate(context.Context, *connect.Request[v1.HTTPEndpointUpdateRequest], *connect.ServerStream[v1.HTTPEndpointUpdateEvent]) error
}
OperatorHandler is an implementation of the dapr.proto.operator.v1.Operator service.
type UnimplementedOperatorHandler ¶
type UnimplementedOperatorHandler struct{}
UnimplementedOperatorHandler returns CodeUnimplemented from all methods.
func (UnimplementedOperatorHandler) ComponentUpdate ¶
func (UnimplementedOperatorHandler) ComponentUpdate(context.Context, *connect.Request[v1.ComponentUpdateRequest], *connect.ServerStream[v1.ComponentUpdateEvent]) error
func (UnimplementedOperatorHandler) GetConfiguration ¶
func (UnimplementedOperatorHandler) GetConfiguration(context.Context, *connect.Request[v1.GetConfigurationRequest]) (*connect.Response[v1.GetConfigurationResponse], error)
func (UnimplementedOperatorHandler) GetResiliency ¶
func (UnimplementedOperatorHandler) GetResiliency(context.Context, *connect.Request[v1.GetResiliencyRequest]) (*connect.Response[v1.GetResiliencyResponse], error)
func (UnimplementedOperatorHandler) HTTPEndpointUpdate ¶
func (UnimplementedOperatorHandler) HTTPEndpointUpdate(context.Context, *connect.Request[v1.HTTPEndpointUpdateRequest], *connect.ServerStream[v1.HTTPEndpointUpdateEvent]) error
func (UnimplementedOperatorHandler) ListComponents ¶
func (UnimplementedOperatorHandler) ListComponents(context.Context, *connect.Request[v1.ListComponentsRequest]) (*connect.Response[v1.ListComponentResponse], error)
func (UnimplementedOperatorHandler) ListHTTPEndpoints ¶
func (UnimplementedOperatorHandler) ListHTTPEndpoints(context.Context, *connect.Request[v1.ListHTTPEndpointsRequest]) (*connect.Response[v1.ListHTTPEndpointsResponse], error)
func (UnimplementedOperatorHandler) ListResiliency ¶
func (UnimplementedOperatorHandler) ListResiliency(context.Context, *connect.Request[v1.ListResiliencyRequest]) (*connect.Response[v1.ListResiliencyResponse], error)
func (UnimplementedOperatorHandler) ListSubscriptions ¶
func (UnimplementedOperatorHandler) ListSubscriptionsV2 ¶
func (UnimplementedOperatorHandler) ListSubscriptionsV2(context.Context, *connect.Request[v1.ListSubscriptionsRequest]) (*connect.Response[v1.ListSubscriptionsResponse], error)
func (UnimplementedOperatorHandler) SubscriptionUpdate ¶
func (UnimplementedOperatorHandler) SubscriptionUpdate(context.Context, *connect.Request[v1.SubscriptionUpdateRequest], *connect.ServerStream[v1.SubscriptionUpdateEvent]) error