server

package
v0.0.0-...-540bb61 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LogLevel_name = map[int32]string{
		0: "TRACE",
		1: "DEBUG",
		2: "INFO",
		3: "WARN",
		4: "ERROR",
		5: "FATAL",
	}
	LogLevel_value = map[string]int32{
		"TRACE": 0,
		"DEBUG": 1,
		"INFO":  2,
		"WARN":  3,
		"ERROR": 4,
		"FATAL": 5,
	}
)

Enum value maps for LogLevel.

View Source
var File_pkg_api_server_operator_proto protoreflect.FileDescriptor
View Source
var Operator_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "server.Operator",
	HandlerType: (*OperatorServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetVersion",
			Handler:    _Operator_GetVersion_Handler,
		},
		{
			MethodName: "GetLogLevel",
			Handler:    _Operator_GetLogLevel_Handler,
		},
		{
			MethodName: "SetLogLevel",
			Handler:    _Operator_SetLogLevel_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pkg/api/server/operator.proto",
}

Operator_ServiceDesc is the grpc.ServiceDesc for Operator service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterOperatorServer

func RegisterOperatorServer(s grpc.ServiceRegistrar, srv OperatorServer)

Types

type Empty

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

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type LogLevel

type LogLevel int32
const (
	LogLevel_TRACE LogLevel = 0
	LogLevel_DEBUG LogLevel = 1
	LogLevel_INFO  LogLevel = 2
	LogLevel_WARN  LogLevel = 3
	LogLevel_ERROR LogLevel = 4
	LogLevel_FATAL LogLevel = 5
)

func (LogLevel) Descriptor

func (LogLevel) Descriptor() protoreflect.EnumDescriptor

func (LogLevel) Enum

func (x LogLevel) Enum() *LogLevel

func (LogLevel) EnumDescriptor deprecated

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

Deprecated: Use LogLevel.Descriptor instead.

func (LogLevel) Number

func (x LogLevel) Number() protoreflect.EnumNumber

func (LogLevel) String

func (x LogLevel) String() string

func (LogLevel) Type

type LogLevelConfig

type LogLevelConfig struct {
	Topics map[string]LogLevel `` /* 175-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*LogLevelConfig) Descriptor deprecated

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

Deprecated: Use LogLevelConfig.ProtoReflect.Descriptor instead.

func (*LogLevelConfig) GetTopics

func (x *LogLevelConfig) GetTopics() map[string]LogLevel

func (*LogLevelConfig) ProtoMessage

func (*LogLevelConfig) ProtoMessage()

func (*LogLevelConfig) ProtoReflect

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

func (*LogLevelConfig) Reset

func (x *LogLevelConfig) Reset()

func (*LogLevelConfig) String

func (x *LogLevelConfig) String() string

type OperatorClient

type OperatorClient interface {
	GetVersion(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Version, error)
	GetLogLevel(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*LogLevelConfig, error)
	SetLogLevel(ctx context.Context, in *LogLevelConfig, opts ...grpc.CallOption) (*Empty, error)
}

OperatorClient is the client API for Operator 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 NewOperatorClient

func NewOperatorClient(cc grpc.ClientConnInterface) OperatorClient

type OperatorServer

type OperatorServer interface {
	GetVersion(context.Context, *Empty) (*Version, error)
	GetLogLevel(context.Context, *Empty) (*LogLevelConfig, error)
	SetLogLevel(context.Context, *LogLevelConfig) (*Empty, error)
	// contains filtered or unexported methods
}

OperatorServer is the server API for Operator service. All implementations must embed UnimplementedOperatorServer for forward compatibility

type UnimplementedOperatorServer

type UnimplementedOperatorServer struct {
}

UnimplementedOperatorServer must be embedded to have forward compatible implementations.

func (UnimplementedOperatorServer) GetLogLevel

func (UnimplementedOperatorServer) GetVersion

func (UnimplementedOperatorServer) SetLogLevel

type UnsafeOperatorServer

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

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

type Version

type Version struct {
	Version   string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	Build     string `protobuf:"bytes,2,opt,name=build,proto3" json:"build,omitempty"`
	Edition   string `protobuf:"bytes,3,opt,name=edition,proto3" json:"edition,omitempty"`
	GoVersion string `protobuf:"bytes,4,opt,name=go_version,json=goVersion,proto3" json:"go_version,omitempty"`
	BuildDate string `protobuf:"bytes,5,opt,name=build_date,json=buildDate,proto3" json:"build_date,omitempty"`
	// contains filtered or unexported fields
}

func (*Version) Descriptor deprecated

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

Deprecated: Use Version.ProtoReflect.Descriptor instead.

func (*Version) GetBuild

func (x *Version) GetBuild() string

func (*Version) GetBuildDate

func (x *Version) GetBuildDate() string

func (*Version) GetEdition

func (x *Version) GetEdition() string

func (*Version) GetGoVersion

func (x *Version) GetGoVersion() string

func (*Version) GetVersion

func (x *Version) GetVersion() string

func (*Version) ProtoMessage

func (*Version) ProtoMessage()

func (*Version) ProtoReflect

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

func (*Version) Reset

func (x *Version) Reset()

func (*Version) String

func (x *Version) String() string

Jump to

Keyboard shortcuts

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