log_sink_server

package
v0.0.0-...-841f565 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_log_sink_server_proto protoreflect.FileDescriptor

Functions

func New

func New(ctx context.Context, client *pubsub.Client, topic *pubsub.Topic, subscription *pubsub.Subscription) *logSinkServer

New creates a new log sink server

func RegisterLogSinkServer

func RegisterLogSinkServer(s *grpc.Server, srv LogSinkServer)

Types

type LogLine

type LogLine struct {
	UserId        string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	TargetAddress string `protobuf:"bytes,2,opt,name=target_address,json=targetAddress,proto3" json:"target_address,omitempty"`
	TargetHash    string `protobuf:"bytes,3,opt,name=target_hash,json=targetHash,proto3" json:"target_hash,omitempty"`
	Data          []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
	CreatedAt     string `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	ReceivedAt    string `protobuf:"bytes,6,opt,name=received_at,json=receivedAt,proto3" json:"received_at,omitempty"`
	OrgId         string `protobuf:"bytes,7,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
	ProjectId     string `protobuf:"bytes,8,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
	// contains filtered or unexported fields
}

func (*LogLine) Descriptor deprecated

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

Deprecated: Use LogLine.ProtoReflect.Descriptor instead.

func (*LogLine) GetCreatedAt

func (x *LogLine) GetCreatedAt() string

func (*LogLine) GetData

func (x *LogLine) GetData() []byte

func (*LogLine) GetOrgId

func (x *LogLine) GetOrgId() string

func (*LogLine) GetProjectId

func (x *LogLine) GetProjectId() string

func (*LogLine) GetReceivedAt

func (x *LogLine) GetReceivedAt() string

func (*LogLine) GetTargetAddress

func (x *LogLine) GetTargetAddress() string

func (*LogLine) GetTargetHash

func (x *LogLine) GetTargetHash() string

func (*LogLine) GetUserId

func (x *LogLine) GetUserId() string

func (*LogLine) ProtoMessage

func (*LogLine) ProtoMessage()

func (*LogLine) ProtoReflect

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

func (*LogLine) Reset

func (x *LogLine) Reset()

func (*LogLine) String

func (x *LogLine) String() string

func (*LogLine) ToJson

func (l *LogLine) ToJson() (string, error)

ToJson maps the LogLine struct into a JSON object

type LogSinkClient

type LogSinkClient interface {
	Record(ctx context.Context, opts ...grpc.CallOption) (LogSink_RecordClient, error)
}

LogSinkClient is the client API for LogSink service.

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

func NewLogSinkClient

func NewLogSinkClient(cc grpc.ClientConnInterface) LogSinkClient

type LogSinkServer

type LogSinkServer interface {
	Record(LogSink_RecordServer) error
}

LogSinkServer is the server API for LogSink service.

type LogSink_RecordClient

type LogSink_RecordClient interface {
	Send(*LogLine) error
	Recv() (*RecordLogLineAck, error)
	grpc.ClientStream
}

type LogSink_RecordServer

type LogSink_RecordServer interface {
	Send(*RecordLogLineAck) error
	Recv() (*LogLine, error)
	grpc.ServerStream
}

type RecordLogLineAck

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

func (*RecordLogLineAck) Descriptor deprecated

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

Deprecated: Use RecordLogLineAck.ProtoReflect.Descriptor instead.

func (*RecordLogLineAck) ProtoMessage

func (*RecordLogLineAck) ProtoMessage()

func (*RecordLogLineAck) ProtoReflect

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

func (*RecordLogLineAck) Reset

func (x *RecordLogLineAck) Reset()

func (*RecordLogLineAck) String

func (x *RecordLogLineAck) String() string

type UnimplementedLogSinkServer

type UnimplementedLogSinkServer struct {
}

UnimplementedLogSinkServer can be embedded to have forward compatible implementations.

func (*UnimplementedLogSinkServer) Record

Jump to

Keyboard shortcuts

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