proto

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: AGPL-3.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EventType_name = map[int32]string{
		0: "Unspecified",
		1: "PeerAdd",
		2: "PeerRemove",
		3: "PeerUpdate",
		4: "PeerTraffic",
	}
	EventType_value = map[string]int32{
		"Unspecified": 0,
		"PeerAdd":     1,
		"PeerRemove":  2,
		"PeerUpdate":  3,
		"PeerTraffic": 4,
	}
)

Enum value maps for EventType.

View Source
var EventLogService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.EventLogService",
	HandlerType: (*EventLogServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "FetchEvents",
			Handler:       _EventLogService_FetchEvents_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "eventlog.proto",
}

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

View Source
var File_eventlog_proto protoreflect.FileDescriptor
View Source
var File_events_proto protoreflect.FileDescriptor
View Source
var File_timestamp_proto protoreflect.FileDescriptor

Functions

func RegisterEventLogServiceServer

func RegisterEventLogServiceServer(s grpc.ServiceRegistrar, srv EventLogServiceServer)

Types

type EventLogServiceClient

type EventLogServiceClient interface {
	// FetchEvents streams back events to a caller
	FetchEvents(ctx context.Context, in *FetchEventsRequest, opts ...grpc.CallOption) (EventLogService_FetchEventsClient, error)
}

EventLogServiceClient is the client API for EventLogService 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.

type EventLogServiceServer

type EventLogServiceServer interface {
	// FetchEvents streams back events to a caller
	FetchEvents(*FetchEventsRequest, EventLogService_FetchEventsServer) error
	// contains filtered or unexported methods
}

EventLogServiceServer is the server API for EventLogService service. All implementations must embed UnimplementedEventLogServiceServer for forward compatibility

type EventLogService_FetchEventsClient

type EventLogService_FetchEventsClient interface {
	Recv() (*FetchEventsResponse, error)
	grpc.ClientStream
}

type EventLogService_FetchEventsServer

type EventLogService_FetchEventsServer interface {
	Send(*FetchEventsResponse) error
	grpc.ServerStream
}

type EventType

type EventType int32

EventType defines types to use with the eventlog package

const (
	EventType_Unspecified EventType = 0
	EventType_PeerAdd     EventType = 1
	EventType_PeerRemove  EventType = 2
	EventType_PeerUpdate  EventType = 3
	// PeerTraffic is for the periodic traffic updates
	EventType_PeerTraffic EventType = 4
)

func (EventType) Descriptor

func (EventType) Descriptor() protoreflect.EnumDescriptor

func (EventType) Enum

func (x EventType) Enum() *EventType

func (EventType) EnumDescriptor deprecated

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

Deprecated: Use EventType.Descriptor instead.

func (EventType) Number

func (x EventType) Number() protoreflect.EnumNumber

func (EventType) String

func (x EventType) String() string

func (EventType) Type

type FetchEventsRequest

type FetchEventsRequest struct {

	// Empty logID means the beginning of the whole journal.
	LogID string `protobuf:"bytes,1,opt,name=logID,proto3" json:"logID,omitempty"`
	// Zero offset means the beginning of the file.
	Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
	// Labels gives a server some idea who called the method.
	// More like a debug/tracing tool. Optional.
	Labels map[string]string `` /* 153-byte string literal not displayed */
	// EventTypes contains the list of events client interested in.
	// Empty list means all events. Optional.
	EventTypes []uint32 `protobuf:"varint,4,rep,packed,name=eventTypes,proto3" json:"eventTypes,omitempty"`
	// contains filtered or unexported fields
}

func (*FetchEventsRequest) Descriptor deprecated

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

Deprecated: Use FetchEventsRequest.ProtoReflect.Descriptor instead.

func (*FetchEventsRequest) GetEventTypes

func (x *FetchEventsRequest) GetEventTypes() []uint32

func (*FetchEventsRequest) GetLabels

func (x *FetchEventsRequest) GetLabels() map[string]string

func (*FetchEventsRequest) GetLogID

func (x *FetchEventsRequest) GetLogID() string

func (*FetchEventsRequest) GetOffset

func (x *FetchEventsRequest) GetOffset() int64

func (*FetchEventsRequest) ProtoMessage

func (*FetchEventsRequest) ProtoMessage()

func (*FetchEventsRequest) ProtoReflect

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

func (*FetchEventsRequest) Reset

func (x *FetchEventsRequest) Reset()

func (*FetchEventsRequest) String

func (x *FetchEventsRequest) String() string

type FetchEventsResponse

type FetchEventsResponse struct {
	EventType uint32 `protobuf:"varint,1,opt,name=eventType,proto3" json:"eventType,omitempty"`
	Timestamp int64  `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	LogID     string `protobuf:"bytes,3,opt,name=logID,proto3" json:"logID,omitempty"`
	Offset    int64  `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"`
	Data      []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

FetchEventsResponse is a mirror of eventlog.Event struct.

func (*FetchEventsResponse) Descriptor deprecated

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

Deprecated: Use FetchEventsResponse.ProtoReflect.Descriptor instead.

func (*FetchEventsResponse) GetData

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

func (*FetchEventsResponse) GetEventType

func (x *FetchEventsResponse) GetEventType() uint32

func (*FetchEventsResponse) GetLogID

func (x *FetchEventsResponse) GetLogID() string

func (*FetchEventsResponse) GetOffset

func (x *FetchEventsResponse) GetOffset() int64

func (*FetchEventsResponse) GetTimestamp

func (x *FetchEventsResponse) GetTimestamp() int64

func (*FetchEventsResponse) ProtoMessage

func (*FetchEventsResponse) ProtoMessage()

func (*FetchEventsResponse) ProtoReflect

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

func (*FetchEventsResponse) Reset

func (x *FetchEventsResponse) Reset()

func (*FetchEventsResponse) String

func (x *FetchEventsResponse) String() string

type PeerInfo

type PeerInfo struct {
	UserID         string     `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"`
	InstallationID string     `protobuf:"bytes,2,opt,name=installationID,proto3" json:"installationID,omitempty"`
	SessionID      string     `protobuf:"bytes,3,opt,name=sessionID,proto3" json:"sessionID,omitempty"`
	Created        *Timestamp `protobuf:"bytes,5,opt,name=created,proto3" json:"created,omitempty"`
	Updated        *Timestamp `protobuf:"bytes,6,opt,name=updated,proto3" json:"updated,omitempty"`
	Expires        *Timestamp `protobuf:"bytes,7,opt,name=expires,proto3" json:"expires,omitempty"`
	BytesTx        uint64     `protobuf:"varint,8,opt,name=bytesTx,proto3" json:"bytesTx,omitempty"`
	BytesRx        uint64     `protobuf:"varint,9,opt,name=bytesRx,proto3" json:"bytesRx,omitempty"`
	// contains filtered or unexported fields
}

PeerInfo describes the peer interacting with the tunnel node

func (*PeerInfo) Descriptor deprecated

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

Deprecated: Use PeerInfo.ProtoReflect.Descriptor instead.

func (*PeerInfo) GetBytesRx

func (x *PeerInfo) GetBytesRx() uint64

func (*PeerInfo) GetBytesTx

func (x *PeerInfo) GetBytesTx() uint64

func (*PeerInfo) GetCreated

func (x *PeerInfo) GetCreated() *Timestamp

func (*PeerInfo) GetExpires

func (x *PeerInfo) GetExpires() *Timestamp

func (*PeerInfo) GetInstallationID

func (x *PeerInfo) GetInstallationID() string

func (*PeerInfo) GetSessionID

func (x *PeerInfo) GetSessionID() string

func (*PeerInfo) GetUpdated

func (x *PeerInfo) GetUpdated() *Timestamp

func (*PeerInfo) GetUserID

func (x *PeerInfo) GetUserID() string

func (*PeerInfo) ProtoMessage

func (*PeerInfo) ProtoMessage()

func (*PeerInfo) ProtoReflect

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

func (*PeerInfo) Reset

func (x *PeerInfo) Reset()

func (*PeerInfo) String

func (x *PeerInfo) String() string

type Timestamp

type Timestamp struct {
	Sec  int64 `protobuf:"varint,1,opt,name=sec,proto3" json:"sec,omitempty"`
	Nsec int64 `protobuf:"varint,2,opt,name=nsec,proto3" json:"nsec,omitempty"`
	// contains filtered or unexported fields
}

Timestamp represents the local Time corresponding to the given Unix time, sec seconds and nsec nanoseconds since January 1, 1970 UTC. It is valid to pass nsec outside the range [0, 999999999]. Not all sec values have a corresponding time value. One such value is 1<<63-1 (the largest int64 value).

func TimestampFromTime

func TimestampFromTime(t time.Time) *Timestamp

TimestampFromTime converts given std time.Time into Timestamp

func (*Timestamp) Descriptor deprecated

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

Deprecated: Use Timestamp.ProtoReflect.Descriptor instead.

func (*Timestamp) GetNsec

func (x *Timestamp) GetNsec() int64

func (*Timestamp) GetSec

func (x *Timestamp) GetSec() int64

func (*Timestamp) IntoTime

func (x *Timestamp) IntoTime() time.Time

func (*Timestamp) ProtoMessage

func (*Timestamp) ProtoMessage()

func (*Timestamp) ProtoReflect

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

func (*Timestamp) Reset

func (x *Timestamp) Reset()

func (*Timestamp) String

func (x *Timestamp) String() string

type UnimplementedEventLogServiceServer

type UnimplementedEventLogServiceServer struct {
}

UnimplementedEventLogServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedEventLogServiceServer) FetchEvents

type UnsafeEventLogServiceServer

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

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

Jump to

Keyboard shortcuts

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