log

package
v0.0.0-...-7f16e2a Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MessageSource_name = map[int32]string{
		0: "SOURCE_TYPE_UNSPECIFIED",
		1: "SOURCE_ROBOT",
		2: "SOURCE_SETTINGS",
		3: "SOURCE_CLIENT",
		4: "SOURCE_TIMEOUT",
	}
	MessageSource_value = map[string]int32{
		"SOURCE_TYPE_UNSPECIFIED": 0,
		"SOURCE_ROBOT":            1,
		"SOURCE_SETTINGS":         2,
		"SOURCE_CLIENT":           3,
		"SOURCE_TIMEOUT":          4,
	}
)

Enum value maps for MessageSource.

View Source
var File_private_log_debug_proto protoreflect.FileDescriptor
View Source
var File_private_log_log_service_proto protoreflect.FileDescriptor

Functions

func RegisterLogServiceServer

func RegisterLogServiceServer(s *grpc.Server, srv LogServiceServer)

Types

type DebugLog

type DebugLog struct {
	CreatedAt *timestamp.Timestamp `protobuf:"bytes,1,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// Storing information of created request
	Create *game.CreateRequest `protobuf:"bytes,2,opt,name=create,proto3" json:"create,omitempty"`
	// Debug information for investigations
	PlayerMessages []*DebugMessages `protobuf:"bytes,3,rep,name=player_messages,json=playerMessages,proto3" json:"player_messages,omitempty"`
	// contains filtered or unexported fields
}

Format for storing logs. (Private usage)

func (*DebugLog) Descriptor deprecated

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

Deprecated: Use DebugLog.ProtoReflect.Descriptor instead.

func (*DebugLog) GetCreate

func (x *DebugLog) GetCreate() *game.CreateRequest

func (*DebugLog) GetCreatedAt

func (x *DebugLog) GetCreatedAt() *timestamp.Timestamp

func (*DebugLog) GetPlayerMessages

func (x *DebugLog) GetPlayerMessages() []*DebugMessages

func (*DebugLog) ProtoMessage

func (*DebugLog) ProtoMessage()

func (*DebugLog) ProtoReflect

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

func (*DebugLog) Reset

func (x *DebugLog) Reset()

func (*DebugLog) String

func (x *DebugLog) String() string

type DebugMessage

type DebugMessage struct {
	Time *timestamp.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"`
	// Types that are assignable to OneofEvents:
	//
	//	*DebugMessage_Client
	//	*DebugMessage_Server
	OneofEvents isDebugMessage_OneofEvents `protobuf_oneof:"oneof_events"`
	Source      MessageSource              `protobuf:"varint,4,opt,name=source,proto3,enum=mahjong.private.log.MessageSource" json:"source,omitempty"`
	// contains filtered or unexported fields
}

func (*DebugMessage) Descriptor deprecated

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

Deprecated: Use DebugMessage.ProtoReflect.Descriptor instead.

func (*DebugMessage) GetClient

func (x *DebugMessage) GetClient() *game1.Client

func (*DebugMessage) GetOneofEvents

func (m *DebugMessage) GetOneofEvents() isDebugMessage_OneofEvents

func (*DebugMessage) GetServer

func (x *DebugMessage) GetServer() *game1.Server

func (*DebugMessage) GetSource

func (x *DebugMessage) GetSource() MessageSource

func (*DebugMessage) GetTime

func (x *DebugMessage) GetTime() *timestamp.Timestamp

func (*DebugMessage) ProtoMessage

func (*DebugMessage) ProtoMessage()

func (*DebugMessage) ProtoReflect

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

func (*DebugMessage) Reset

func (x *DebugMessage) Reset()

func (*DebugMessage) String

func (x *DebugMessage) String() string

type DebugMessage_Client

type DebugMessage_Client struct {
	Client *game1.Client `protobuf:"bytes,2,opt,name=client,proto3,oneof"`
}

type DebugMessage_Server

type DebugMessage_Server struct {
	Server *game1.Server `protobuf:"bytes,3,opt,name=server,proto3,oneof"`
}

type DebugMessages

type DebugMessages struct {
	Messages []*DebugMessage `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
	// contains filtered or unexported fields
}

func (*DebugMessages) Descriptor deprecated

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

Deprecated: Use DebugMessages.ProtoReflect.Descriptor instead.

func (*DebugMessages) GetMessages

func (x *DebugMessages) GetMessages() []*DebugMessage

func (*DebugMessages) ProtoMessage

func (*DebugMessages) ProtoMessage()

func (*DebugMessages) ProtoReflect

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

func (*DebugMessages) Reset

func (x *DebugMessages) Reset()

func (*DebugMessages) String

func (x *DebugMessages) String() string

type GetDebugLogRequest

type GetDebugLogRequest struct {
	LogId string `protobuf:"bytes,1,opt,name=log_id,json=logId,proto3" json:"log_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetDebugLogRequest) Descriptor deprecated

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

Deprecated: Use GetDebugLogRequest.ProtoReflect.Descriptor instead.

func (*GetDebugLogRequest) GetLogId

func (x *GetDebugLogRequest) GetLogId() string

func (*GetDebugLogRequest) ProtoMessage

func (*GetDebugLogRequest) ProtoMessage()

func (*GetDebugLogRequest) ProtoReflect

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

func (*GetDebugLogRequest) Reset

func (x *GetDebugLogRequest) Reset()

func (*GetDebugLogRequest) String

func (x *GetDebugLogRequest) String() string

type GetDebugLogResponse

type GetDebugLogResponse struct {
	Debug *DebugLog `protobuf:"bytes,1,opt,name=debug,proto3" json:"debug,omitempty"`
	// contains filtered or unexported fields
}

func (*GetDebugLogResponse) Descriptor deprecated

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

Deprecated: Use GetDebugLogResponse.ProtoReflect.Descriptor instead.

func (*GetDebugLogResponse) GetDebug

func (x *GetDebugLogResponse) GetDebug() *DebugLog

func (*GetDebugLogResponse) ProtoMessage

func (*GetDebugLogResponse) ProtoMessage()

func (*GetDebugLogResponse) ProtoReflect

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

func (*GetDebugLogResponse) Reset

func (x *GetDebugLogResponse) Reset()

func (*GetDebugLogResponse) String

func (x *GetDebugLogResponse) String() string

type LogServiceClient

type LogServiceClient interface {
	GetDebugLog(ctx context.Context, in *GetDebugLogRequest, opts ...grpc.CallOption) (*GetDebugLogResponse, error)
	SaveLog(ctx context.Context, in *SaveLogRequest, opts ...grpc.CallOption) (*SaveLogResponse, error)
}

LogServiceClient is the client API for LogService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewLogServiceClient

func NewLogServiceClient(cc grpc.ClientConnInterface) LogServiceClient

type LogServiceServer

type LogServiceServer interface {
	GetDebugLog(context.Context, *GetDebugLogRequest) (*GetDebugLogResponse, error)
	SaveLog(context.Context, *SaveLogRequest) (*SaveLogResponse, error)
}

LogServiceServer is the server API for LogService service.

type MessageSource

type MessageSource int32
const (
	MessageSource_SOURCE_TYPE_UNSPECIFIED MessageSource = 0
	// Message produced by robot, replacing the offline player.
	MessageSource_SOURCE_ROBOT MessageSource = 1
	// Message resulted by settings on server side. Ex. AutoWin
	MessageSource_SOURCE_SETTINGS MessageSource = 2
	// Message produced by players action.
	MessageSource_SOURCE_CLIENT MessageSource = 3
	// Message produced by timeout on server side.
	MessageSource_SOURCE_TIMEOUT MessageSource = 4
)

func (MessageSource) Descriptor

func (MessageSource) Enum

func (x MessageSource) Enum() *MessageSource

func (MessageSource) EnumDescriptor deprecated

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

Deprecated: Use MessageSource.Descriptor instead.

func (MessageSource) Number

func (MessageSource) String

func (x MessageSource) String() string

func (MessageSource) Type

type SaveLogRequest

type SaveLogRequest struct {
	Log   *log.Log  `protobuf:"bytes,1,opt,name=log,proto3" json:"log,omitempty"`
	Debug *DebugLog `protobuf:"bytes,2,opt,name=debug,proto3" json:"debug,omitempty"`
	// contains filtered or unexported fields
}

func (*SaveLogRequest) Descriptor deprecated

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

Deprecated: Use SaveLogRequest.ProtoReflect.Descriptor instead.

func (*SaveLogRequest) GetDebug

func (x *SaveLogRequest) GetDebug() *DebugLog

func (*SaveLogRequest) GetLog

func (x *SaveLogRequest) GetLog() *log.Log

func (*SaveLogRequest) ProtoMessage

func (*SaveLogRequest) ProtoMessage()

func (*SaveLogRequest) ProtoReflect

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

func (*SaveLogRequest) Reset

func (x *SaveLogRequest) Reset()

func (*SaveLogRequest) String

func (x *SaveLogRequest) String() string

type SaveLogResponse

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

func (*SaveLogResponse) Descriptor deprecated

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

Deprecated: Use SaveLogResponse.ProtoReflect.Descriptor instead.

func (*SaveLogResponse) ProtoMessage

func (*SaveLogResponse) ProtoMessage()

func (*SaveLogResponse) ProtoReflect

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

func (*SaveLogResponse) Reset

func (x *SaveLogResponse) Reset()

func (*SaveLogResponse) String

func (x *SaveLogResponse) String() string

type UnimplementedLogServiceServer

type UnimplementedLogServiceServer struct {
}

UnimplementedLogServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedLogServiceServer) GetDebugLog

func (*UnimplementedLogServiceServer) SaveLog

Jump to

Keyboard shortcuts

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