service

package
v0.0.0-...-65f36f6 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Code generated by protoc-gen-micro source: service.proto

Code generated by protoc-gen-micro source: service.proto

Index

Constants

This section is empty.

Variables

View Source
var File_service_proto protoreflect.FileDescriptor

Functions

func NewLoggerEndpoints

func NewLoggerEndpoints() []*micro_api.Endpoint

NewLoggerEndpoints provides api endpoints metdata for Logger service

func RegisterLoggerHandler

func RegisterLoggerHandler(s micro_server.Server, sh LoggerHandler, opts ...micro_server.HandlerOption) error

RegisterLoggerHandler registers server handler

func RegisterLoggerServer

func RegisterLoggerServer(s *grpc.Server, srv LoggerServer)

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 Field

type Field struct {
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// Types that are assignable to Val:
	//	*Field_DoubleVal
	//	*Field_FloatVal
	//	*Field_Int32Val
	//	*Field_Int64Val
	Val isField_Val `protobuf_oneof:"val"`
	// contains filtered or unexported fields
}

func (*Field) Descriptor deprecated

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

Deprecated: Use Field.ProtoReflect.Descriptor instead.

func (*Field) GetDoubleVal

func (x *Field) GetDoubleVal() float64

func (*Field) GetFloatVal

func (x *Field) GetFloatVal() float32

func (*Field) GetInt32Val

func (x *Field) GetInt32Val() int32

func (*Field) GetInt64Val

func (x *Field) GetInt64Val() int64

func (*Field) GetKey

func (x *Field) GetKey() string

func (*Field) GetVal

func (m *Field) GetVal() isField_Val

func (*Field) ProtoMessage

func (*Field) ProtoMessage()

func (*Field) ProtoReflect

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

func (*Field) Reset

func (x *Field) Reset()

func (*Field) String

func (x *Field) String() string

type Field_DoubleVal

type Field_DoubleVal struct {
	DoubleVal float64 `protobuf:"fixed64,2,opt,name=double_val,json=doubleVal,proto3,oneof"`
}

type Field_FloatVal

type Field_FloatVal struct {
	FloatVal float32 `protobuf:"fixed32,3,opt,name=float_val,json=floatVal,proto3,oneof"`
}

type Field_Int32Val

type Field_Int32Val struct {
	Int32Val int32 `protobuf:"varint,4,opt,name=int32_val,json=int32Val,proto3,oneof"`
}

type Field_Int64Val

type Field_Int64Val struct {
	Int64Val int64 `protobuf:"varint,5,opt,name=int64_val,json=int64Val,proto3,oneof"` //1
}

type LoggerClient

type LoggerClient interface {
	Log(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Empty, error)
}

LoggerClient is the client API for Logger 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 NewLoggerClient

func NewLoggerClient(cc grpc.ClientConnInterface) LoggerClient

type LoggerHandler

type LoggerHandler interface {
	Log(context.Context, *Message, *Empty) error
}

LoggerHandler server handler

type LoggerServer

type LoggerServer interface {
	Log(context.Context, *Message) (*Empty, error)
	// contains filtered or unexported methods
}

LoggerServer is the server API for Logger service. All implementations must embed UnimplementedLoggerServer for forward compatibility

type LoggerService

type LoggerService interface {
	Log(context.Context, *Message, ...micro_client.CallOption) (*Empty, error)
}

LoggerService interface

func NewLoggerService

func NewLoggerService(name string, c micro_client.Client) LoggerService

NewLoggerService create new service client

type Message

type Message struct {
	Level  int32    `protobuf:"varint,1,opt,name=level,proto3" json:"level,omitempty"`
	Format string   `protobuf:"bytes,2,opt,name=format,proto3" json:"format,omitempty"`
	Msg    string   `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"`
	Fields []*Field `protobuf:"bytes,4,rep,name=fields,proto3" json:"fields,omitempty"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetFields

func (x *Message) GetFields() []*Field

func (*Message) GetFormat

func (x *Message) GetFormat() string

func (*Message) GetLevel

func (x *Message) GetLevel() int32

func (*Message) GetMsg

func (x *Message) GetMsg() string

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

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

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type UnimplementedLoggerServer

type UnimplementedLoggerServer struct {
}

UnimplementedLoggerServer must be embedded to have forward compatible implementations.

func (*UnimplementedLoggerServer) Log

Jump to

Keyboard shortcuts

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