Documentation ¶
Overview ¶
Package v1 contains the v1 GRPC client and server definitions for implementing ping interactions for the Platform.
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterPingServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterPingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PingServiceClient) error
- func RegisterPingServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterPingServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PingServiceServer) error
- func RegisterPingServiceServer(s grpc.ServiceRegistrar, srv PingServiceServer)
- type Clients
- type PingRequest
- type PingServiceClient
- type PingServiceServer
- type Response
- type UnimplementedPingServiceServer
- type UnsafePingServiceServer
Constants ¶
const (
PingService_Ping_FullMethodName = "/chainguard.platform.ping.PingService/Ping"
)
Variables ¶
var File_ping_platform_proto protoreflect.FileDescriptor
var PingService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "chainguard.platform.ping.PingService", HandlerType: (*PingServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Ping", Handler: _PingService_Ping_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "ping.platform.proto", }
PingService_ServiceDesc is the grpc.ServiceDesc for PingService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPingServiceHandler ¶
func RegisterPingServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterPingServiceHandler registers the http handlers for service PingService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterPingServiceHandlerClient ¶
func RegisterPingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PingServiceClient) error
RegisterPingServiceHandlerClient registers the http handlers for service PingService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PingServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PingServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "PingServiceClient" to call the correct interceptors.
func RegisterPingServiceHandlerFromEndpoint ¶
func RegisterPingServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterPingServiceHandlerFromEndpoint is same as RegisterPingServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterPingServiceHandlerServer ¶
func RegisterPingServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PingServiceServer) error
RegisterPingServiceHandlerServer registers the http handlers for service PingService to "mux". UnaryRPC :call PingServiceServer 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 RegisterPingServiceHandlerFromEndpoint instead.
func RegisterPingServiceServer ¶
func RegisterPingServiceServer(s grpc.ServiceRegistrar, srv PingServiceServer)
Types ¶
type Clients ¶
type Clients interface { Ping() PingServiceClient Close() error }
func NewClientsFromConnection ¶
func NewClientsFromConnection(conn *grpc.ClientConn) Clients
type PingRequest ¶
type PingRequest struct {
// contains filtered or unexported fields
}
func (*PingRequest) Descriptor
deprecated
func (*PingRequest) Descriptor() ([]byte, []int)
Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.
func (*PingRequest) ProtoMessage ¶
func (*PingRequest) ProtoMessage()
func (*PingRequest) ProtoReflect ¶
func (x *PingRequest) ProtoReflect() protoreflect.Message
func (*PingRequest) Reset ¶
func (x *PingRequest) Reset()
func (*PingRequest) String ¶
func (x *PingRequest) String() string
type PingServiceClient ¶
type PingServiceClient interface {
Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*Response, error)
}
PingServiceClient is the client API for PingService 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.
func NewPingServiceClient ¶
func NewPingServiceClient(cc grpc.ClientConnInterface) PingServiceClient
type PingServiceServer ¶
type PingServiceServer interface { Ping(context.Context, *PingRequest) (*Response, error) // contains filtered or unexported methods }
PingServiceServer is the server API for PingService service. All implementations must embed UnimplementedPingServiceServer for forward compatibility
type Response ¶
type Response struct { Response string `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
func (*Response) GetResponse ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type UnimplementedPingServiceServer ¶
type UnimplementedPingServiceServer struct { }
UnimplementedPingServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedPingServiceServer) Ping ¶
func (UnimplementedPingServiceServer) Ping(context.Context, *PingRequest) (*Response, error)
type UnsafePingServiceServer ¶
type UnsafePingServiceServer interface {
// contains filtered or unexported methods
}
UnsafePingServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PingServiceServer will result in compilation errors.