backendv1beta1connect

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConfigurationServiceName is the fully-qualified name of the ConfigurationService service.
	ConfigurationServiceName = "lekko.backend.v1beta1.ConfigurationService"
)
View Source
const (
	// DistributionServiceName is the fully-qualified name of the DistributionService service.
	DistributionServiceName = "lekko.backend.v1beta1.DistributionService"
)

Variables

This section is empty.

Functions

func NewConfigurationServiceHandler

func NewConfigurationServiceHandler(svc ConfigurationServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler)

NewConfigurationServiceHandler 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 NewDistributionServiceHandler

func NewDistributionServiceHandler(svc DistributionServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler)

NewDistributionServiceHandler 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 ConfigurationServiceClient

type ConfigurationServiceClient interface {
	GetBoolValue(context.Context, *connect_go.Request[v1beta1.GetBoolValueRequest]) (*connect_go.Response[v1beta1.GetBoolValueResponse], error)
	GetProtoValue(context.Context, *connect_go.Request[v1beta1.GetProtoValueRequest]) (*connect_go.Response[v1beta1.GetProtoValueResponse], error)
	GetJSONValue(context.Context, *connect_go.Request[v1beta1.GetJSONValueRequest]) (*connect_go.Response[v1beta1.GetJSONValueResponse], error)
	// Register is used to denote a RepositoryKey and namespaces within it
	// that a client is interested in so the server can cache and keep up to date.
	Register(context.Context, *connect_go.Request[v1beta1.RegisterRequest]) (*connect_go.Response[v1beta1.RegisterResponse], error)
}

ConfigurationServiceClient is a client for the lekko.backend.v1beta1.ConfigurationService service.

func NewConfigurationServiceClient

func NewConfigurationServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) ConfigurationServiceClient

NewConfigurationServiceClient constructs a client for the lekko.backend.v1beta1.ConfigurationService 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 ConfigurationServiceHandler

type ConfigurationServiceHandler interface {
	GetBoolValue(context.Context, *connect_go.Request[v1beta1.GetBoolValueRequest]) (*connect_go.Response[v1beta1.GetBoolValueResponse], error)
	GetProtoValue(context.Context, *connect_go.Request[v1beta1.GetProtoValueRequest]) (*connect_go.Response[v1beta1.GetProtoValueResponse], error)
	GetJSONValue(context.Context, *connect_go.Request[v1beta1.GetJSONValueRequest]) (*connect_go.Response[v1beta1.GetJSONValueResponse], error)
	// Register is used to denote a RepositoryKey and namespaces within it
	// that a client is interested in so the server can cache and keep up to date.
	Register(context.Context, *connect_go.Request[v1beta1.RegisterRequest]) (*connect_go.Response[v1beta1.RegisterResponse], error)
}

ConfigurationServiceHandler is an implementation of the lekko.backend.v1beta1.ConfigurationService service.

type DistributionServiceClient

type DistributionServiceClient interface {
	// Returns the latest commit sha of the repository. The client is expected to poll this
	// rpc to become aware of updates.
	GetRepositoryVersion(context.Context, *connect_go.Request[v1beta1.GetRepositoryVersionRequest]) (*connect_go.Response[v1beta1.GetRepositoryVersionResponse], error)
	// Returns the entire state of the repository, including all feature flags.
	GetRepositoryContents(context.Context, *connect_go.Request[v1beta1.GetRepositoryContentsRequest]) (*connect_go.Response[v1beta1.GetRepositoryContentsResponse], error)
	// Sends metrics to the backend related to flag evaluation. This rpc can be used
	// to batch metrics to lekko servers.
	SendFlagEvaluationMetrics(context.Context, *connect_go.Request[v1beta1.SendFlagEvaluationMetricsRequest]) (*connect_go.Response[v1beta1.SendFlagEvaluationMetricsResponse], error)
	// Registers a client and returns a session key.
	RegisterClient(context.Context, *connect_go.Request[v1beta1.RegisterClientRequest]) (*connect_go.Response[v1beta1.RegisterClientResponse], error)
}

DistributionServiceClient is a client for the lekko.backend.v1beta1.DistributionService service.

func NewDistributionServiceClient

func NewDistributionServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) DistributionServiceClient

NewDistributionServiceClient constructs a client for the lekko.backend.v1beta1.DistributionService 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 DistributionServiceHandler

type DistributionServiceHandler interface {
	// Returns the latest commit sha of the repository. The client is expected to poll this
	// rpc to become aware of updates.
	GetRepositoryVersion(context.Context, *connect_go.Request[v1beta1.GetRepositoryVersionRequest]) (*connect_go.Response[v1beta1.GetRepositoryVersionResponse], error)
	// Returns the entire state of the repository, including all feature flags.
	GetRepositoryContents(context.Context, *connect_go.Request[v1beta1.GetRepositoryContentsRequest]) (*connect_go.Response[v1beta1.GetRepositoryContentsResponse], error)
	// Sends metrics to the backend related to flag evaluation. This rpc can be used
	// to batch metrics to lekko servers.
	SendFlagEvaluationMetrics(context.Context, *connect_go.Request[v1beta1.SendFlagEvaluationMetricsRequest]) (*connect_go.Response[v1beta1.SendFlagEvaluationMetricsResponse], error)
	// Registers a client and returns a session key.
	RegisterClient(context.Context, *connect_go.Request[v1beta1.RegisterClientRequest]) (*connect_go.Response[v1beta1.RegisterClientResponse], error)
}

DistributionServiceHandler is an implementation of the lekko.backend.v1beta1.DistributionService service.

type UnimplementedConfigurationServiceHandler

type UnimplementedConfigurationServiceHandler struct{}

UnimplementedConfigurationServiceHandler returns CodeUnimplemented from all methods.

type UnimplementedDistributionServiceHandler

type UnimplementedDistributionServiceHandler struct{}

UnimplementedDistributionServiceHandler returns CodeUnimplemented from all methods.

Jump to

Keyboard shortcuts

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