server

package
v0.0.0-...-33a4775 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LogLevel_name = map[int32]string{
		0: "LOG_LEVEL_TRACE_UNSPECIFIED",
		1: "LOG_LEVEL_DEBUG",
		2: "LOG_LEVEL_INFO",
		3: "LOG_LEVEL_WARN",
		4: "LOG_LEVEL_ERROR",
		5: "LOG_LEVEL_FATAL",
	}
	LogLevel_value = map[string]int32{
		"LOG_LEVEL_TRACE_UNSPECIFIED": 0,
		"LOG_LEVEL_DEBUG":             1,
		"LOG_LEVEL_INFO":              2,
		"LOG_LEVEL_WARN":              3,
		"LOG_LEVEL_ERROR":             4,
		"LOG_LEVEL_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 LogLevel

type LogLevel int32

LogLevel defined the Log Levels

const (
	// LOG_LEVEL_TRACE_UNSPECIFIED defines Trace or Undefined log level
	LogLevel_LOG_LEVEL_TRACE_UNSPECIFIED LogLevel = 0
	// LOG_LEVEL_DEBUG defines Debug log level
	LogLevel_LOG_LEVEL_DEBUG LogLevel = 1
	// LOG_LEVEL_INFO defines Info log level
	LogLevel_LOG_LEVEL_INFO LogLevel = 2
	// LOG_LEVEL_WARN defines Warn log level
	LogLevel_LOG_LEVEL_WARN LogLevel = 3
	// LOG_LEVEL_ERROR defines Error log level
	LogLevel_LOG_LEVEL_ERROR LogLevel = 4
	// LOG_LEVEL_FATAL defines Fatal log level
	LogLevel_LOG_LEVEL_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 define map of the topics and corresponding log levels
	Topics map[string]LogLevel `` /* 175-byte string literal not displayed */
	// contains filtered or unexported fields
}

LogLevelConfig define the LogLevel Configs

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 returns Operator version
	GetVersion(ctx context.Context, in *definition.Empty, opts ...grpc.CallOption) (*Version, error)
	// GetLogLevel returns Operator LogLevels
	GetLogLevel(ctx context.Context, in *definition.Empty, opts ...grpc.CallOption) (*LogLevelConfig, error)
	// SetLogLevel sets Operator LogLevels
	SetLogLevel(ctx context.Context, in *LogLevelConfig, opts ...grpc.CallOption) (*definition.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 returns Operator version
	GetVersion(context.Context, *definition.Empty) (*Version, error)
	// GetLogLevel returns Operator LogLevels
	GetLogLevel(context.Context, *definition.Empty) (*LogLevelConfig, error)
	// SetLogLevel sets Operator LogLevels
	SetLogLevel(context.Context, *LogLevelConfig) (*definition.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 keeps version info
	Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	// build keeps build info
	Build string `protobuf:"bytes,2,opt,name=build,proto3" json:"build,omitempty"`
	// edition keeps the Operator edition
	Edition string `protobuf:"bytes,3,opt,name=edition,proto3" json:"edition,omitempty"`
	// go_version keeps the version of go used in build
	GoVersion string `protobuf:"bytes,4,opt,name=go_version,json=goVersion,proto3" json:"go_version,omitempty"`
	// build_date keeps the build date
	BuildDate string `protobuf:"bytes,5,opt,name=build_date,json=buildDate,proto3" json:"build_date,omitempty"`
	// contains filtered or unexported fields
}

Version define the version details

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