Documentation
¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterSlaveServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterSlaveServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SlaveServiceClient) error
- func RegisterSlaveServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterSlaveServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SlaveServiceServer) error
- func RegisterSlaveServiceServer(s grpc.ServiceRegistrar, srv SlaveServiceServer)
- type Authn
- type Preshared
- type RegisterRequest
- func (*RegisterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterRequest) GetAddress() string
- func (x *RegisterRequest) GetAuthn() *Authn
- func (x *RegisterRequest) GetId() string
- func (x *RegisterRequest) GetTlsEnabled() bool
- func (x *RegisterRequest) GetValidationIds() []string
- func (*RegisterRequest) ProtoMessage()
- func (x *RegisterRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterRequest) Reset()
- func (x *RegisterRequest) String() string
- type RegisterResponse
- type SlaveServiceClient
- type SlaveServiceServer
- type UnimplementedSlaveServiceServer
- type UnsafeSlaveServiceServer
Constants ¶
const (
SlaveService_Register_FullMethodName = "/slave.v1.SlaveService/Register"
)
Variables ¶
var File_proto_slave_v1_slave_proto protoreflect.FileDescriptor
var SlaveService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "slave.v1.SlaveService", HandlerType: (*SlaveServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Register", Handler: _SlaveService_Register_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/slave/v1/slave.proto", }
SlaveService_ServiceDesc is the grpc.ServiceDesc for SlaveService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSlaveServiceHandler ¶
func RegisterSlaveServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterSlaveServiceHandler registers the http handlers for service SlaveService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterSlaveServiceHandlerClient ¶
func RegisterSlaveServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SlaveServiceClient) error
RegisterSlaveServiceHandlerClient registers the http handlers for service SlaveService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SlaveServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SlaveServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SlaveServiceClient" to call the correct interceptors.
func RegisterSlaveServiceHandlerFromEndpoint ¶
func RegisterSlaveServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterSlaveServiceHandlerFromEndpoint is same as RegisterSlaveServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterSlaveServiceHandlerServer ¶
func RegisterSlaveServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SlaveServiceServer) error
RegisterSlaveServiceHandlerServer registers the http handlers for service SlaveService to "mux". UnaryRPC :call SlaveServiceServer 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 RegisterSlaveServiceHandlerFromEndpoint instead.
func RegisterSlaveServiceServer ¶
func RegisterSlaveServiceServer(s grpc.ServiceRegistrar, srv SlaveServiceServer)
Types ¶
type Authn ¶
type Authn struct { Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` // contains filtered or unexported fields }
func (*Authn) Descriptor
deprecated
func (*Authn) GetPreshared ¶
func (*Authn) ProtoMessage ¶
func (*Authn) ProtoMessage()
func (*Authn) ProtoReflect ¶
func (x *Authn) ProtoReflect() protoreflect.Message
type Preshared ¶
type Preshared struct { // contains filtered or unexported fields }
func (*Preshared) Descriptor
deprecated
func (*Preshared) ProtoMessage ¶
func (*Preshared) ProtoMessage()
func (*Preshared) ProtoReflect ¶
func (x *Preshared) ProtoReflect() protoreflect.Message
type RegisterRequest ¶
type RegisterRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` TlsEnabled bool `protobuf:"varint,3,opt,name=tls_enabled,json=tlsEnabled,proto3" json:"tls_enabled,omitempty"` ValidationIds []string `protobuf:"bytes,4,rep,name=validation_ids,json=validationIds,proto3" json:"validation_ids,omitempty"` Authn *Authn `protobuf:"bytes,5,opt,name=authn,proto3" json:"authn,omitempty"` // contains filtered or unexported fields }
func (*RegisterRequest) Descriptor
deprecated
func (*RegisterRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.
func (*RegisterRequest) GetAddress ¶
func (x *RegisterRequest) GetAddress() string
func (*RegisterRequest) GetAuthn ¶
func (x *RegisterRequest) GetAuthn() *Authn
func (*RegisterRequest) GetId ¶
func (x *RegisterRequest) GetId() string
func (*RegisterRequest) GetTlsEnabled ¶
func (x *RegisterRequest) GetTlsEnabled() bool
func (*RegisterRequest) GetValidationIds ¶
func (x *RegisterRequest) GetValidationIds() []string
func (*RegisterRequest) ProtoMessage ¶
func (*RegisterRequest) ProtoMessage()
func (*RegisterRequest) ProtoReflect ¶
func (x *RegisterRequest) ProtoReflect() protoreflect.Message
func (*RegisterRequest) Reset ¶
func (x *RegisterRequest) Reset()
func (*RegisterRequest) String ¶
func (x *RegisterRequest) String() string
type RegisterResponse ¶
type RegisterResponse struct {
// contains filtered or unexported fields
}
func (*RegisterResponse) Descriptor
deprecated
func (*RegisterResponse) Descriptor() ([]byte, []int)
Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead.
func (*RegisterResponse) ProtoMessage ¶
func (*RegisterResponse) ProtoMessage()
func (*RegisterResponse) ProtoReflect ¶
func (x *RegisterResponse) ProtoReflect() protoreflect.Message
func (*RegisterResponse) Reset ¶
func (x *RegisterResponse) Reset()
func (*RegisterResponse) String ¶
func (x *RegisterResponse) String() string
type SlaveServiceClient ¶
type SlaveServiceClient interface {
Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error)
}
SlaveServiceClient is the client API for SlaveService 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 NewSlaveServiceClient ¶
func NewSlaveServiceClient(cc grpc.ClientConnInterface) SlaveServiceClient
type SlaveServiceServer ¶
type SlaveServiceServer interface { Register(context.Context, *RegisterRequest) (*RegisterResponse, error) // contains filtered or unexported methods }
SlaveServiceServer is the server API for SlaveService service. All implementations must embed UnimplementedSlaveServiceServer for forward compatibility
type UnimplementedSlaveServiceServer ¶
type UnimplementedSlaveServiceServer struct { }
UnimplementedSlaveServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedSlaveServiceServer) Register ¶
func (UnimplementedSlaveServiceServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
type UnsafeSlaveServiceServer ¶
type UnsafeSlaveServiceServer interface {
// contains filtered or unexported methods
}
UnsafeSlaveServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SlaveServiceServer will result in compilation errors.