queryv1connect

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// QueryFrontendServiceName is the fully-qualified name of the QueryFrontendService service.
	QueryFrontendServiceName = "query.v1.QueryFrontendService"
	// QueryBackendServiceName is the fully-qualified name of the QueryBackendService service.
	QueryBackendServiceName = "query.v1.QueryBackendService"
)
View Source
const (
	// QueryFrontendServiceQueryProcedure is the fully-qualified name of the QueryFrontendService's
	// Query RPC.
	QueryFrontendServiceQueryProcedure = "/query.v1.QueryFrontendService/Query"
	// QueryBackendServiceInvokeProcedure is the fully-qualified name of the QueryBackendService's
	// Invoke RPC.
	QueryBackendServiceInvokeProcedure = "/query.v1.QueryBackendService/Invoke"
)

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 NewQueryBackendServiceHandler

func NewQueryBackendServiceHandler(svc QueryBackendServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewQueryBackendServiceHandler 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 NewQueryFrontendServiceHandler

func NewQueryFrontendServiceHandler(svc QueryFrontendServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewQueryFrontendServiceHandler 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 RegisterQueryBackendServiceHandler

func RegisterQueryBackendServiceHandler(mux *mux.Router, svc QueryBackendServiceHandler, opts ...connect.HandlerOption)

RegisterQueryBackendServiceHandler register an HTTP handler to a mux.Router from the service implementation.

func RegisterQueryFrontendServiceHandler

func RegisterQueryFrontendServiceHandler(mux *mux.Router, svc QueryFrontendServiceHandler, opts ...connect.HandlerOption)

RegisterQueryFrontendServiceHandler register an HTTP handler to a mux.Router from the service implementation.

Types

type QueryBackendServiceClient

type QueryBackendServiceClient interface {
	Invoke(context.Context, *connect.Request[v1.InvokeRequest]) (*connect.Response[v1.InvokeResponse], error)
}

QueryBackendServiceClient is a client for the query.v1.QueryBackendService service.

func NewQueryBackendServiceClient

func NewQueryBackendServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) QueryBackendServiceClient

NewQueryBackendServiceClient constructs a client for the query.v1.QueryBackendService 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 QueryBackendServiceHandler

type QueryBackendServiceHandler interface {
	Invoke(context.Context, *connect.Request[v1.InvokeRequest]) (*connect.Response[v1.InvokeResponse], error)
}

QueryBackendServiceHandler is an implementation of the query.v1.QueryBackendService service.

type QueryFrontendServiceClient

type QueryFrontendServiceClient interface {
	Query(context.Context, *connect.Request[v1.QueryRequest]) (*connect.Response[v1.QueryResponse], error)
}

QueryFrontendServiceClient is a client for the query.v1.QueryFrontendService service.

func NewQueryFrontendServiceClient

func NewQueryFrontendServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) QueryFrontendServiceClient

NewQueryFrontendServiceClient constructs a client for the query.v1.QueryFrontendService 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 QueryFrontendServiceHandler

type QueryFrontendServiceHandler interface {
	Query(context.Context, *connect.Request[v1.QueryRequest]) (*connect.Response[v1.QueryResponse], error)
}

QueryFrontendServiceHandler is an implementation of the query.v1.QueryFrontendService service.

type UnimplementedQueryBackendServiceHandler

type UnimplementedQueryBackendServiceHandler struct{}

UnimplementedQueryBackendServiceHandler returns CodeUnimplemented from all methods.

func (UnimplementedQueryBackendServiceHandler) Invoke

type UnimplementedQueryFrontendServiceHandler

type UnimplementedQueryFrontendServiceHandler struct{}

UnimplementedQueryFrontendServiceHandler returns CodeUnimplemented from all methods.

func (UnimplementedQueryFrontendServiceHandler) Query

Jump to

Keyboard shortcuts

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