Documentation ¶
Overview ¶
Package system is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterSystemServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterSystemServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SystemServiceClient) error
- func RegisterSystemServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterSystemServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SystemServiceServer) error
- func RegisterSystemServiceServer(s grpc.ServiceRegistrar, srv SystemServiceServer)
- type SystemServiceClient
- type SystemServiceServer
- type SystemStatus
- func (*SystemStatus) Descriptor() ([]byte, []int)deprecated
- func (x *SystemStatus) GetReady() bool
- func (*SystemStatus) ProtoMessage()
- func (x *SystemStatus) ProtoReflect() protoreflect.Message
- func (x *SystemStatus) Reset()
- func (x *SystemStatus) String() string
- func (m *SystemStatus) Validate() error
- func (m *SystemStatus) ValidateAll() error
- type SystemStatusMultiError
- type SystemStatusValidationError
- func (e SystemStatusValidationError) Cause() error
- func (e SystemStatusValidationError) Error() string
- func (e SystemStatusValidationError) ErrorName() string
- func (e SystemStatusValidationError) Field() string
- func (e SystemStatusValidationError) Key() bool
- func (e SystemStatusValidationError) Reason() string
- type UnimplementedSystemServiceServer
- type UnsafeSystemServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_system_system_proto protoreflect.FileDescriptor
var SystemService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "system.SystemService", HandlerType: (*SystemServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetStatus", Handler: _SystemService_GetStatus_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "system/system.proto", }
SystemService_ServiceDesc is the grpc.ServiceDesc for SystemService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSystemServiceHandler ¶
func RegisterSystemServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterSystemServiceHandler registers the http handlers for service SystemService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterSystemServiceHandlerClient ¶
func RegisterSystemServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SystemServiceClient) error
RegisterSystemServiceHandlerClient registers the http handlers for service SystemService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SystemServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SystemServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SystemServiceClient" to call the correct interceptors.
func RegisterSystemServiceHandlerFromEndpoint ¶
func RegisterSystemServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterSystemServiceHandlerFromEndpoint is same as RegisterSystemServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterSystemServiceHandlerServer ¶
func RegisterSystemServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SystemServiceServer) error
RegisterSystemServiceHandlerServer registers the http handlers for service SystemService to "mux". UnaryRPC :call SystemServiceServer 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 RegisterSystemServiceHandlerFromEndpoint instead.
func RegisterSystemServiceServer ¶
func RegisterSystemServiceServer(s grpc.ServiceRegistrar, srv SystemServiceServer)
Types ¶
type SystemServiceClient ¶
type SystemServiceClient interface {
GetStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*SystemStatus, error)
}
SystemServiceClient is the client API for SystemService 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 NewSystemServiceClient ¶
func NewSystemServiceClient(cc grpc.ClientConnInterface) SystemServiceClient
type SystemServiceServer ¶
type SystemServiceServer interface {
GetStatus(context.Context, *emptypb.Empty) (*SystemStatus, error)
}
SystemServiceServer is the server API for SystemService service. All implementations should embed UnimplementedSystemServiceServer for forward compatibility
type SystemStatus ¶
type SystemStatus struct { Ready bool `protobuf:"varint,1,opt,name=ready,proto3" json:"ready,omitempty"` // contains filtered or unexported fields }
func (*SystemStatus) Descriptor
deprecated
func (*SystemStatus) Descriptor() ([]byte, []int)
Deprecated: Use SystemStatus.ProtoReflect.Descriptor instead.
func (*SystemStatus) GetReady ¶
func (x *SystemStatus) GetReady() bool
func (*SystemStatus) ProtoMessage ¶
func (*SystemStatus) ProtoMessage()
func (*SystemStatus) ProtoReflect ¶
func (x *SystemStatus) ProtoReflect() protoreflect.Message
func (*SystemStatus) Reset ¶
func (x *SystemStatus) Reset()
func (*SystemStatus) String ¶
func (x *SystemStatus) String() string
func (*SystemStatus) Validate ¶
func (m *SystemStatus) Validate() error
Validate checks the field values on SystemStatus with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*SystemStatus) ValidateAll ¶
func (m *SystemStatus) ValidateAll() error
ValidateAll checks the field values on SystemStatus with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SystemStatusMultiError, or nil if none found.
type SystemStatusMultiError ¶
type SystemStatusMultiError []error
SystemStatusMultiError is an error wrapping multiple validation errors returned by SystemStatus.ValidateAll() if the designated constraints aren't met.
func (SystemStatusMultiError) AllErrors ¶
func (m SystemStatusMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SystemStatusMultiError) Error ¶
func (m SystemStatusMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SystemStatusValidationError ¶
type SystemStatusValidationError struct {
// contains filtered or unexported fields
}
SystemStatusValidationError is the validation error returned by SystemStatus.Validate if the designated constraints aren't met.
func (SystemStatusValidationError) Cause ¶
func (e SystemStatusValidationError) Cause() error
Cause function returns cause value.
func (SystemStatusValidationError) Error ¶
func (e SystemStatusValidationError) Error() string
Error satisfies the builtin error interface
func (SystemStatusValidationError) ErrorName ¶
func (e SystemStatusValidationError) ErrorName() string
ErrorName returns error name.
func (SystemStatusValidationError) Field ¶
func (e SystemStatusValidationError) Field() string
Field function returns field value.
func (SystemStatusValidationError) Key ¶
func (e SystemStatusValidationError) Key() bool
Key function returns key value.
func (SystemStatusValidationError) Reason ¶
func (e SystemStatusValidationError) Reason() string
Reason function returns reason value.
type UnimplementedSystemServiceServer ¶
type UnimplementedSystemServiceServer struct { }
UnimplementedSystemServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedSystemServiceServer) GetStatus ¶
func (UnimplementedSystemServiceServer) GetStatus(context.Context, *emptypb.Empty) (*SystemStatus, error)
type UnsafeSystemServiceServer ¶
type UnsafeSystemServiceServer interface {
// contains filtered or unexported methods
}
UnsafeSystemServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SystemServiceServer will result in compilation errors.