distcachev1

package
v2.21.0-rc.1 Latest Latest
Warning

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

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

Documentation

Overview

Package distcachev1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	DistCacheService_GetStats_FullMethodName = "/aperture.distcache.v1.DistCacheService/GetStats"
)

Variables

View Source
var DistCacheService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "aperture.distcache.v1.DistCacheService",
	HandlerType: (*DistCacheServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetStats",
			Handler:    _DistCacheService_GetStats_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "aperture/distcache/v1/stats.proto",
}

DistCacheService_ServiceDesc is the grpc.ServiceDesc for DistCacheService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_aperture_distcache_v1_stats_proto protoreflect.FileDescriptor

Functions

func RegisterDistCacheServiceHandler

func RegisterDistCacheServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterDistCacheServiceHandler registers the http handlers for service DistCacheService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterDistCacheServiceHandlerClient

func RegisterDistCacheServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DistCacheServiceClient) error

RegisterDistCacheServiceHandlerClient registers the http handlers for service DistCacheService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DistCacheServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DistCacheServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "DistCacheServiceClient" to call the correct interceptors.

func RegisterDistCacheServiceHandlerFromEndpoint

func RegisterDistCacheServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterDistCacheServiceHandlerFromEndpoint is same as RegisterDistCacheServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterDistCacheServiceHandlerServer

func RegisterDistCacheServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DistCacheServiceServer) error

RegisterDistCacheServiceHandlerServer registers the http handlers for service DistCacheService to "mux". UnaryRPC :call DistCacheServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterDistCacheServiceHandlerFromEndpoint instead.

func RegisterDistCacheServiceServer

func RegisterDistCacheServiceServer(s grpc.ServiceRegistrar, srv DistCacheServiceServer)

Types

type DistCacheServiceClient

type DistCacheServiceClient interface {
	GetStats(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*structpb.Struct, error)
}

DistCacheServiceClient is the client API for DistCacheService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type DistCacheServiceServer

type DistCacheServiceServer interface {
	GetStats(context.Context, *emptypb.Empty) (*structpb.Struct, error)
}

DistCacheServiceServer is the server API for DistCacheService service. All implementations should embed UnimplementedDistCacheServiceServer for forward compatibility

type UnimplementedDistCacheServiceServer

type UnimplementedDistCacheServiceServer struct {
}

UnimplementedDistCacheServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedDistCacheServiceServer) GetStats

type UnsafeDistCacheServiceServer

type UnsafeDistCacheServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeDistCacheServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DistCacheServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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