control

package
v0.27.7 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HealthStatus_name = map[int32]string{
		0: "HEALTH_STATUS_UNDEFINED",
		1: "STARTING",
		2: "READY",
		3: "SHUTTING_DOWN",
	}
	HealthStatus_value = map[string]int32{
		"HEALTH_STATUS_UNDEFINED": 0,
		"STARTING":                1,
		"READY":                   2,
		"SHUTTING_DOWN":           3,
	}
)

Enum value maps for HealthStatus.

View Source
var ControlService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "ircontrol.ControlService",
	HandlerType: (*ControlServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "HealthCheck",
			Handler:    _ControlService_HealthCheck_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pkg/services/control/ir/service.proto",
}

ControlService_ServiceDesc is the grpc.ServiceDesc for ControlService 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_pkg_services_control_ir_service_proto protoreflect.FileDescriptor
View Source
var File_pkg_services_control_ir_types_proto protoreflect.FileDescriptor

Functions

func RegisterControlServiceServer

func RegisterControlServiceServer(s grpc.ServiceRegistrar, srv ControlServiceServer)

Types

type ControlServiceClient

type ControlServiceClient interface {
	// Performs health check of the IR node.
	HealthCheck(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error)
}

ControlServiceClient is the client API for ControlService 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 ControlServiceServer

type ControlServiceServer interface {
	// Performs health check of the IR node.
	HealthCheck(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error)
}

ControlServiceServer is the server API for ControlService service. All implementations should embed UnimplementedControlServiceServer for forward compatibility

type HealthCheckRequest

type HealthCheckRequest struct {

	// Body of health check request message.
	Body *HealthCheckRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
	// Body signature.
	// Should be signed by node key or one of
	// the keys configured by the node.
	Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

Health check request.

func (*HealthCheckRequest) Descriptor deprecated

func (*HealthCheckRequest) Descriptor() ([]byte, []int)

Deprecated: Use HealthCheckRequest.ProtoReflect.Descriptor instead.

func (*HealthCheckRequest) GetBody

func (*HealthCheckRequest) GetSignature

func (x *HealthCheckRequest) GetSignature() *Signature

func (*HealthCheckRequest) ProtoMessage

func (*HealthCheckRequest) ProtoMessage()

func (*HealthCheckRequest) ProtoReflect

func (x *HealthCheckRequest) ProtoReflect() protoreflect.Message

func (*HealthCheckRequest) ReadSignedData

func (x *HealthCheckRequest) ReadSignedData(buf []byte) ([]byte, error)

ReadSignedData reads signed data of health check request to buf.

If buffer length is less than x.SignedDataSize(), new buffer is allocated.

Returns any error encountered which did not allow writing the data completely. Otherwise, returns the buffer in which the data is written.

Structures with the same field values have the same signed data.

func (*HealthCheckRequest) Reset

func (x *HealthCheckRequest) Reset()

func (*HealthCheckRequest) SetBody

SetBody sets health check request body.

func (*HealthCheckRequest) SetSignature

func (x *HealthCheckRequest) SetSignature(body *Signature)

SetSignature sets signature of the health check request body.

func (*HealthCheckRequest) SignedDataSize

func (x *HealthCheckRequest) SignedDataSize() int

SignedDataSize returns binary size of the signed data of health check request.

Structures with the same field values have the same signed data size.

func (*HealthCheckRequest) String

func (x *HealthCheckRequest) String() string

type HealthCheckRequest_Body

type HealthCheckRequest_Body struct {
	// contains filtered or unexported fields
}

Health check request body.

func (*HealthCheckRequest_Body) Descriptor deprecated

func (*HealthCheckRequest_Body) Descriptor() ([]byte, []int)

Deprecated: Use HealthCheckRequest_Body.ProtoReflect.Descriptor instead.

func (*HealthCheckRequest_Body) ProtoMessage

func (*HealthCheckRequest_Body) ProtoMessage()

func (*HealthCheckRequest_Body) ProtoReflect

func (x *HealthCheckRequest_Body) ProtoReflect() protoreflect.Message

func (*HealthCheckRequest_Body) Reset

func (x *HealthCheckRequest_Body) Reset()

func (*HealthCheckRequest_Body) StableMarshal

func (x *HealthCheckRequest_Body) StableMarshal(buf []byte) ([]byte, error)

StableMarshal reads binary representation of health check request body in protobuf binary format.

If buffer length is less than x.StableSize(), new buffer is allocated.

Returns any error encountered which did not allow writing the data completely. Otherwise, returns the buffer in which the data is written.

Structures with the same field values have the same binary format.

func (*HealthCheckRequest_Body) StableSize

func (x *HealthCheckRequest_Body) StableSize() int

StableSize returns binary size of health check request body in protobuf binary format.

Structures with the same field values have the same binary size.

func (*HealthCheckRequest_Body) String

func (x *HealthCheckRequest_Body) String() string

type HealthCheckResponse

type HealthCheckResponse struct {

	// Body of health check response message.
	Body *HealthCheckResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
	// Body signature.
	Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

Health check response.

func HealthCheck

func HealthCheck(
	cli *client.Client,
	req *HealthCheckRequest,
	opts ...client.CallOption,
) (*HealthCheckResponse, error)

HealthCheck executes ControlService.HealthCheck RPC.

func (*HealthCheckResponse) Descriptor deprecated

func (*HealthCheckResponse) Descriptor() ([]byte, []int)

Deprecated: Use HealthCheckResponse.ProtoReflect.Descriptor instead.

func (*HealthCheckResponse) GetBody

func (*HealthCheckResponse) GetSignature

func (x *HealthCheckResponse) GetSignature() *Signature

func (*HealthCheckResponse) ProtoMessage

func (*HealthCheckResponse) ProtoMessage()

func (*HealthCheckResponse) ProtoReflect

func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message

func (*HealthCheckResponse) ReadSignedData

func (x *HealthCheckResponse) ReadSignedData(buf []byte) ([]byte, error)

ReadSignedData reads signed data of health check response to buf.

If buffer length is less than x.SignedDataSize(), new buffer is allocated.

Returns any error encountered which did not allow writing the data completely. Otherwise, returns the buffer in which the data is written.

Structures with the same field values have the same signed data.

func (*HealthCheckResponse) Reset

func (x *HealthCheckResponse) Reset()

func (*HealthCheckResponse) SetBody

SetBody sets health check response body.

func (*HealthCheckResponse) SetSignature

func (x *HealthCheckResponse) SetSignature(v *Signature)

SetSignature sets signature of the health check response body.

func (*HealthCheckResponse) SignedDataSize

func (x *HealthCheckResponse) SignedDataSize() int

SignedDataSize returns binary size of the signed data of health check response.

Structures with the same field values have the same signed data size.

func (*HealthCheckResponse) String

func (x *HealthCheckResponse) String() string

type HealthCheckResponse_Body

type HealthCheckResponse_Body struct {

	// Health status of IR node application.
	HealthStatus HealthStatus `` /* 126-byte string literal not displayed */
	// contains filtered or unexported fields
}

Health check response body

func (*HealthCheckResponse_Body) Descriptor deprecated

func (*HealthCheckResponse_Body) Descriptor() ([]byte, []int)

Deprecated: Use HealthCheckResponse_Body.ProtoReflect.Descriptor instead.

func (*HealthCheckResponse_Body) GetHealthStatus

func (x *HealthCheckResponse_Body) GetHealthStatus() HealthStatus

func (*HealthCheckResponse_Body) ProtoMessage

func (*HealthCheckResponse_Body) ProtoMessage()

func (*HealthCheckResponse_Body) ProtoReflect

func (x *HealthCheckResponse_Body) ProtoReflect() protoreflect.Message

func (*HealthCheckResponse_Body) Reset

func (x *HealthCheckResponse_Body) Reset()

func (*HealthCheckResponse_Body) SetHealthStatus

func (x *HealthCheckResponse_Body) SetHealthStatus(v HealthStatus)

SetHealthStatus sets health status of the IR application.

func (*HealthCheckResponse_Body) StableMarshal

func (x *HealthCheckResponse_Body) StableMarshal(buf []byte) ([]byte, error)

StableMarshal reads binary representation of health check response body in protobuf binary format.

If buffer length is less than x.StableSize(), new buffer is allocated.

Returns any error encountered which did not allow writing the data completely. Otherwise, returns the buffer in which the data is written.

Structures with the same field values have the same binary format.

func (*HealthCheckResponse_Body) StableSize

func (x *HealthCheckResponse_Body) StableSize() int

StableSize returns binary size of health check response body in protobuf binary format.

Structures with the same field values have the same binary size.

func (*HealthCheckResponse_Body) String

func (x *HealthCheckResponse_Body) String() string

type HealthStatus

type HealthStatus int32

Health status of the IR application.

const (
	// Undefined status, default value.
	HealthStatus_HEALTH_STATUS_UNDEFINED HealthStatus = 0
	// IR application is starting.
	HealthStatus_STARTING HealthStatus = 1
	// IR application is started and serves all services.
	HealthStatus_READY HealthStatus = 2
	// IR application is shutting down.
	HealthStatus_SHUTTING_DOWN HealthStatus = 3
)

func (HealthStatus) Descriptor

func (HealthStatus) Enum

func (x HealthStatus) Enum() *HealthStatus

func (HealthStatus) EnumDescriptor deprecated

func (HealthStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use HealthStatus.Descriptor instead.

func (HealthStatus) Number

func (HealthStatus) String

func (x HealthStatus) String() string

func (HealthStatus) Type

type Signature

type Signature struct {

	// Public key used for signing.
	Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// Binary signature.
	Sign []byte `protobuf:"bytes,2,opt,name=sign,json=signature,proto3" json:"sign,omitempty"`
	// contains filtered or unexported fields
}

Signature of some message.

func (*Signature) Descriptor deprecated

func (*Signature) Descriptor() ([]byte, []int)

Deprecated: Use Signature.ProtoReflect.Descriptor instead.

func (*Signature) GetKey

func (x *Signature) GetKey() []byte

func (*Signature) GetSign

func (x *Signature) GetSign() []byte

func (*Signature) ProtoMessage

func (*Signature) ProtoMessage()

func (*Signature) ProtoReflect

func (x *Signature) ProtoReflect() protoreflect.Message

func (*Signature) Reset

func (x *Signature) Reset()

func (*Signature) SetKey

func (x *Signature) SetKey(v []byte)

SetKey sets public key used for signing.

func (*Signature) SetSign

func (x *Signature) SetSign(v []byte)

SetSign sets binary signature.

func (*Signature) String

func (x *Signature) String() string

type UnimplementedControlServiceServer

type UnimplementedControlServiceServer struct {
}

UnimplementedControlServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedControlServiceServer) HealthCheck

type UnsafeControlServiceServer added in v0.26.0

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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