system

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2022 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Package system is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_system_system_proto protoreflect.FileDescriptor
View Source
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.

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

Cause function returns cause value.

func (SystemStatusValidationError) Error

Error satisfies the builtin error interface

func (SystemStatusValidationError) ErrorName

func (e SystemStatusValidationError) ErrorName() string

ErrorName returns error name.

func (SystemStatusValidationError) Field

Field function returns field value.

func (SystemStatusValidationError) Key

Key function returns key value.

func (SystemStatusValidationError) Reason

Reason function returns reason value.

type UnimplementedSystemServiceServer

type UnimplementedSystemServiceServer struct {
}

UnimplementedSystemServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedSystemServiceServer) GetStatus

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.

Jump to

Keyboard shortcuts

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