log_v1

package
v0.0.0-...-f74767b Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Item_Level_name = map[int32]string{
		0: "CORE",
		1: "ENGINE",
		2: "SERVICES",
		3: "RESOURCES",
	}
	Item_Level_value = map[string]int32{
		"CORE":      0,
		"ENGINE":    1,
		"SERVICES":  2,
		"RESOURCES": 3,
	}
)

Enum value maps for Item_Level.

View Source
var (
	Item_Resource_name = map[int32]string{
		0: "SOURCE",
		1: "SPACE",
		2: "ASSET",
	}
	Item_Resource_value = map[string]int32{
		"SOURCE": 0,
		"SPACE":  1,
		"ASSET":  2,
	}
)

Enum value maps for Item_Resource.

View Source
var File_pb_v1_log_log_proto protoreflect.FileDescriptor
View Source
var Log_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "log.v1.Log",
	HandlerType: (*LogServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Produce",
			Handler:    _Log_Produce_Handler,
		},
		{
			MethodName: "Consume",
			Handler:    _Log_Consume_Handler,
		},
		{
			MethodName: "GetServers",
			Handler:    _Log_GetServers_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ConsumeStream",
			Handler:       _Log_ConsumeStream_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "ProduceStream",
			Handler:       _Log_ProduceStream_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "pb/v1/log/log.proto",
}

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

Functions

func RegisterLogServer

func RegisterLogServer(s grpc.ServiceRegistrar, srv LogServer)

Types

type Connections

type Connections struct {
	ID   string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Path string `protobuf:"bytes,2,opt,name=Path,proto3" json:"Path,omitempty"`
	// contains filtered or unexported fields
}

func (*Connections) Descriptor deprecated

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

Deprecated: Use Connections.ProtoReflect.Descriptor instead.

func (*Connections) GetID

func (x *Connections) GetID() string

func (*Connections) GetPath

func (x *Connections) GetPath() string

func (*Connections) ProtoMessage

func (*Connections) ProtoMessage()

func (*Connections) ProtoReflect

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

func (*Connections) Reset

func (x *Connections) Reset()

func (*Connections) String

func (x *Connections) String() string

type ConsumeRequest

type ConsumeRequest struct {
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

func (*ConsumeRequest) Descriptor deprecated

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

Deprecated: Use ConsumeRequest.ProtoReflect.Descriptor instead.

func (*ConsumeRequest) GetKey

func (x *ConsumeRequest) GetKey() string

func (*ConsumeRequest) ProtoMessage

func (*ConsumeRequest) ProtoMessage()

func (*ConsumeRequest) ProtoReflect

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

func (*ConsumeRequest) Reset

func (x *ConsumeRequest) Reset()

func (*ConsumeRequest) String

func (x *ConsumeRequest) String() string

type ConsumeResponse

type ConsumeResponse struct {
	Record *Record `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"`
	// contains filtered or unexported fields
}

func (*ConsumeResponse) Descriptor deprecated

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

Deprecated: Use ConsumeResponse.ProtoReflect.Descriptor instead.

func (*ConsumeResponse) GetRecord

func (x *ConsumeResponse) GetRecord() *Record

func (*ConsumeResponse) ProtoMessage

func (*ConsumeResponse) ProtoMessage()

func (*ConsumeResponse) ProtoReflect

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

func (*ConsumeResponse) Reset

func (x *ConsumeResponse) Reset()

func (*ConsumeResponse) String

func (x *ConsumeResponse) String() string

type ErrorOffsetOutOfRange

type ErrorOffsetOutOfRange struct {
	Offset uint64
}

func (ErrorOffsetOutOfRange) Error

func (e ErrorOffsetOutOfRange) Error() string

func (ErrorOffsetOutOfRange) GRPCStatus

func (e ErrorOffsetOutOfRange) GRPCStatus() *status.Status

type GetServersRequest

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

func (*GetServersRequest) Descriptor deprecated

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

Deprecated: Use GetServersRequest.ProtoReflect.Descriptor instead.

func (*GetServersRequest) ProtoMessage

func (*GetServersRequest) ProtoMessage()

func (*GetServersRequest) ProtoReflect

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

func (*GetServersRequest) Reset

func (x *GetServersRequest) Reset()

func (*GetServersRequest) String

func (x *GetServersRequest) String() string

type GetServersResponse

type GetServersResponse struct {
	Servers []*Server `protobuf:"bytes,1,rep,name=servers,proto3" json:"servers,omitempty"`
	// contains filtered or unexported fields
}

func (*GetServersResponse) Descriptor deprecated

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

Deprecated: Use GetServersResponse.ProtoReflect.Descriptor instead.

func (*GetServersResponse) GetServers

func (x *GetServersResponse) GetServers() []*Server

func (*GetServersResponse) ProtoMessage

func (*GetServersResponse) ProtoMessage()

func (*GetServersResponse) ProtoReflect

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

func (*GetServersResponse) Reset

func (x *GetServersResponse) Reset()

func (*GetServersResponse) String

func (x *GetServersResponse) String() string

type Item

type Item struct {
	ID       string        `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Path     string        `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	Level    Item_Level    `protobuf:"varint,3,opt,name=level,proto3,enum=log.v1.Item_Level" json:"level,omitempty"`
	Type     Item_Resource `protobuf:"varint,4,opt,name=type,proto3,enum=log.v1.Item_Resource" json:"type,omitempty"`
	Key      string        `protobuf:"bytes,5,opt,name=key,proto3" json:"key,omitempty"`
	Value    string        `protobuf:"bytes,6,opt,name=value,proto3" json:"value,omitempty"`
	Created  int64         `protobuf:"varint,7,opt,name=created,proto3" json:"created,omitempty"`
	Modified int64         `protobuf:"varint,8,opt,name=modified,proto3" json:"modified,omitempty"`
	Version  uint64        `protobuf:"varint,9,opt,name=version,proto3" json:"version,omitempty"`
	Meta     []byte        `protobuf:"bytes,10,opt,name=meta,proto3" json:"meta,omitempty"`
	UserMeta []byte        `protobuf:"bytes,11,opt,name=user_meta,json=userMeta,proto3" json:"user_meta,omitempty"`
	// contains filtered or unexported fields
}

func (*Item) Descriptor deprecated

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

Deprecated: Use Item.ProtoReflect.Descriptor instead.

func (*Item) GetCreated

func (x *Item) GetCreated() int64

func (*Item) GetID

func (x *Item) GetID() string

func (*Item) GetKey

func (x *Item) GetKey() string

func (*Item) GetLevel

func (x *Item) GetLevel() Item_Level

func (*Item) GetMeta

func (x *Item) GetMeta() []byte

func (*Item) GetModified

func (x *Item) GetModified() int64

func (*Item) GetPath

func (x *Item) GetPath() string

func (*Item) GetType

func (x *Item) GetType() Item_Resource

func (*Item) GetUserMeta

func (x *Item) GetUserMeta() []byte

func (*Item) GetValue

func (x *Item) GetValue() string

func (*Item) GetVersion

func (x *Item) GetVersion() uint64

func (*Item) ProtoMessage

func (*Item) ProtoMessage()

func (*Item) ProtoReflect

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

func (*Item) Reset

func (x *Item) Reset()

func (*Item) String

func (x *Item) String() string

type ItemList

type ItemList struct {
	Items []*Item `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*ItemList) Descriptor deprecated

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

Deprecated: Use ItemList.ProtoReflect.Descriptor instead.

func (*ItemList) GetItems

func (x *ItemList) GetItems() []*Item

func (*ItemList) ProtoMessage

func (*ItemList) ProtoMessage()

func (*ItemList) ProtoReflect

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

func (*ItemList) Reset

func (x *ItemList) Reset()

func (*ItemList) String

func (x *ItemList) String() string

type Item_Level

type Item_Level int32
const (
	Item_CORE      Item_Level = 0
	Item_ENGINE    Item_Level = 1
	Item_SERVICES  Item_Level = 2
	Item_RESOURCES Item_Level = 3
)

func (Item_Level) Descriptor

func (Item_Level) Descriptor() protoreflect.EnumDescriptor

func (Item_Level) Enum

func (x Item_Level) Enum() *Item_Level

func (Item_Level) EnumDescriptor deprecated

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

Deprecated: Use Item_Level.Descriptor instead.

func (Item_Level) Number

func (x Item_Level) Number() protoreflect.EnumNumber

func (Item_Level) String

func (x Item_Level) String() string

func (Item_Level) Type

type Item_Resource

type Item_Resource int32
const (
	Item_SOURCE Item_Resource = 0
	Item_SPACE  Item_Resource = 1
	Item_ASSET  Item_Resource = 2
)

func (Item_Resource) Descriptor

func (Item_Resource) Enum

func (x Item_Resource) Enum() *Item_Resource

func (Item_Resource) EnumDescriptor deprecated

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

Deprecated: Use Item_Resource.Descriptor instead.

func (Item_Resource) Number

func (Item_Resource) String

func (x Item_Resource) String() string

func (Item_Resource) Type

type LogClient

type LogClient interface {
	//Unary call
	Produce(ctx context.Context, in *ProduceRequest, opts ...grpc.CallOption) (*ProduceResponse, error)
	//Unary call
	Consume(ctx context.Context, in *ConsumeRequest, opts ...grpc.CallOption) (*ConsumeResponse, error)
	// Streaming server
	ConsumeStream(ctx context.Context, in *ConsumeRequest, opts ...grpc.CallOption) (Log_ConsumeStreamClient, error)
	// Streaming bidirectional
	ProduceStream(ctx context.Context, opts ...grpc.CallOption) (Log_ProduceStreamClient, error)
	// Unary call
	GetServers(ctx context.Context, in *GetServersRequest, opts ...grpc.CallOption) (*GetServersResponse, error)
}

LogClient is the client API for Log 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 NewLogClient

func NewLogClient(cc grpc.ClientConnInterface) LogClient

type LogServer

type LogServer interface {
	//Unary call
	Produce(context.Context, *ProduceRequest) (*ProduceResponse, error)
	//Unary call
	Consume(context.Context, *ConsumeRequest) (*ConsumeResponse, error)
	// Streaming server
	ConsumeStream(*ConsumeRequest, Log_ConsumeStreamServer) error
	// Streaming bidirectional
	ProduceStream(Log_ProduceStreamServer) error
	// Unary call
	GetServers(context.Context, *GetServersRequest) (*GetServersResponse, error)
	// contains filtered or unexported methods
}

LogServer is the server API for Log service. All implementations must embed UnimplementedLogServer for forward compatibility

type Log_ConsumeStreamClient

type Log_ConsumeStreamClient interface {
	Recv() (*ConsumeResponse, error)
	grpc.ClientStream
}

type Log_ConsumeStreamServer

type Log_ConsumeStreamServer interface {
	Send(*ConsumeResponse) error
	grpc.ServerStream
}

type Log_ProduceStreamClient

type Log_ProduceStreamClient interface {
	Send(*ProduceRequest) error
	Recv() (*ProduceResponse, error)
	grpc.ClientStream
}

type Log_ProduceStreamServer

type Log_ProduceStreamServer interface {
	Send(*ProduceResponse) error
	Recv() (*ProduceRequest, error)
	grpc.ServerStream
}

type ProduceRequest

type ProduceRequest struct {
	Record *Record `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"`
	// contains filtered or unexported fields
}

func (*ProduceRequest) Descriptor deprecated

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

Deprecated: Use ProduceRequest.ProtoReflect.Descriptor instead.

func (*ProduceRequest) GetRecord

func (x *ProduceRequest) GetRecord() *Record

func (*ProduceRequest) ProtoMessage

func (*ProduceRequest) ProtoMessage()

func (*ProduceRequest) ProtoReflect

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

func (*ProduceRequest) Reset

func (x *ProduceRequest) Reset()

func (*ProduceRequest) String

func (x *ProduceRequest) String() string

type ProduceResponse

type ProduceResponse struct {
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

func (*ProduceResponse) Descriptor deprecated

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

Deprecated: Use ProduceResponse.ProtoReflect.Descriptor instead.

func (*ProduceResponse) GetKey

func (x *ProduceResponse) GetKey() string

func (*ProduceResponse) ProtoMessage

func (*ProduceResponse) ProtoMessage()

func (*ProduceResponse) ProtoReflect

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

func (*ProduceResponse) Reset

func (x *ProduceResponse) Reset()

func (*ProduceResponse) String

func (x *ProduceResponse) String() string

type Record

type Record struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Record) Descriptor deprecated

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

Deprecated: Use Record.ProtoReflect.Descriptor instead.

func (*Record) GetKey

func (x *Record) GetKey() string

func (*Record) GetValue

func (x *Record) GetValue() string

func (*Record) ProtoMessage

func (*Record) ProtoMessage()

func (*Record) ProtoReflect

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

func (*Record) Reset

func (x *Record) Reset()

func (*Record) String

func (x *Record) String() string

type Server

type Server struct {
	Id       string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	RpcAddr  string `protobuf:"bytes,2,opt,name=rpc_addr,json=rpcAddr,proto3" json:"rpc_addr,omitempty"`
	IsLeader bool   `protobuf:"varint,3,opt,name=is_leader,json=isLeader,proto3" json:"is_leader,omitempty"`
	// contains filtered or unexported fields
}

func (*Server) Descriptor deprecated

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

Deprecated: Use Server.ProtoReflect.Descriptor instead.

func (*Server) GetId

func (x *Server) GetId() string

func (*Server) GetIsLeader

func (x *Server) GetIsLeader() bool

func (*Server) GetRpcAddr

func (x *Server) GetRpcAddr() string

func (*Server) ProtoMessage

func (*Server) ProtoMessage()

func (*Server) ProtoReflect

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

func (*Server) Reset

func (x *Server) Reset()

func (*Server) String

func (x *Server) String() string

type UnimplementedLogServer

type UnimplementedLogServer struct {
}

UnimplementedLogServer must be embedded to have forward compatible implementations.

func (UnimplementedLogServer) Consume

func (UnimplementedLogServer) ConsumeStream

func (UnimplementedLogServer) GetServers

func (UnimplementedLogServer) Produce

func (UnimplementedLogServer) ProduceStream

type UnsafeLogServer

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

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

Jump to

Keyboard shortcuts

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