Documentation ¶
Index ¶
- Variables
- func RegisterEventLogServiceServer(s grpc.ServiceRegistrar, srv EventLogServiceServer)
- type EventFetchedRequest
- func (*EventFetchedRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EventFetchedRequest) GetPosition() *EventLogPosition
- func (x *EventFetchedRequest) GetResetEventlogPosition() bool
- func (*EventFetchedRequest) ProtoMessage()
- func (x *EventFetchedRequest) ProtoReflect() protoreflect.Message
- func (x *EventFetchedRequest) Reset()
- func (x *EventFetchedRequest) String() string
- type EventFetchedResponse
- type EventLogPosition
- func (*EventLogPosition) Descriptor() ([]byte, []int)deprecated
- func (x *EventLogPosition) GetLogId() string
- func (x *EventLogPosition) GetOffset() int64
- func (*EventLogPosition) ProtoMessage()
- func (x *EventLogPosition) ProtoReflect() protoreflect.Message
- func (x *EventLogPosition) Reset()
- func (x *EventLogPosition) String() string
- type EventLogServiceClient
- type EventLogServiceServer
- type EventLogService_EventFetchedClient
- type EventLogService_EventFetchedServer
- type EventLogService_FetchEventsClient
- type EventLogService_FetchEventsServer
- type EventType
- type FetchEventsRequest
- func (*FetchEventsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FetchEventsRequest) GetEventTypes() []EventType
- func (x *FetchEventsRequest) GetPosition() *EventLogPosition
- func (x *FetchEventsRequest) GetSkipEventAtPosition() bool
- func (*FetchEventsRequest) ProtoMessage()
- func (x *FetchEventsRequest) ProtoReflect() protoreflect.Message
- func (x *FetchEventsRequest) Reset()
- func (x *FetchEventsRequest) String() string
- type FetchEventsResponse
- func (*FetchEventsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *FetchEventsResponse) GetData() []byte
- func (x *FetchEventsResponse) GetEventType() EventType
- func (x *FetchEventsResponse) GetPosition() *EventLogPosition
- func (x *FetchEventsResponse) GetTimestamp() *Timestamp
- func (*FetchEventsResponse) ProtoMessage()
- func (x *FetchEventsResponse) ProtoReflect() protoreflect.Message
- func (x *FetchEventsResponse) Reset()
- func (x *FetchEventsResponse) String() string
- type PeerInfo
- func (*PeerInfo) Descriptor() ([]byte, []int)deprecated
- func (x *PeerInfo) GetActivity() *Timestamp
- func (x *PeerInfo) GetActivityID() string
- func (x *PeerInfo) GetBytesDeltaRx() uint64
- func (x *PeerInfo) GetBytesDeltaTx() uint64
- func (x *PeerInfo) GetBytesRx() uint64
- func (x *PeerInfo) GetBytesTx() uint64
- func (x *PeerInfo) GetCountry() string
- func (x *PeerInfo) GetCreated() *Timestamp
- func (x *PeerInfo) GetExpires() *Timestamp
- func (x *PeerInfo) GetInstallationID() string
- func (x *PeerInfo) GetLabel() string
- func (x *PeerInfo) GetSeconds() uint64
- func (x *PeerInfo) GetSessionID() string
- func (x *PeerInfo) GetUpdated() *Timestamp
- func (x *PeerInfo) GetUserID() string
- func (*PeerInfo) ProtoMessage()
- func (x *PeerInfo) ProtoReflect() protoreflect.Message
- func (x *PeerInfo) Reset()
- func (x *PeerInfo) String() string
- type Timestamp
- func (*Timestamp) Descriptor() ([]byte, []int)deprecated
- func (x *Timestamp) GetNsec() int64
- func (x *Timestamp) GetSec() int64
- func (x *Timestamp) IntoTime() time.Time
- func (*Timestamp) ProtoMessage()
- func (x *Timestamp) ProtoReflect() protoreflect.Message
- func (x *Timestamp) Reset()
- func (x *Timestamp) String() string
- type UnimplementedEventLogServiceServer
- type UnsafeEventLogServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( EventType_name = map[int32]string{ 0: "Unspecified", 1: "PeerAdd", 2: "PeerRemove", 3: "PeerUpdate", 4: "PeerTraffic", 5: "PeerFirstConnect", } EventType_value = map[string]int32{ "Unspecified": 0, "PeerAdd": 1, "PeerRemove": 2, "PeerUpdate": 3, "PeerTraffic": 4, "PeerFirstConnect": 5, } )
Enum value maps for EventType.
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, }, { StreamName: "EventFetched", Handler: _EventLogService_EventFetched_Handler, ClientStreams: 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)
var File_eventlog_proto protoreflect.FileDescriptor
var File_events_proto protoreflect.FileDescriptor
var File_timestamp_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEventLogServiceServer ¶
func RegisterEventLogServiceServer(s grpc.ServiceRegistrar, srv EventLogServiceServer)
Types ¶
type EventFetchedRequest ¶ added in v0.3.5
type EventFetchedRequest struct { // position to ack the server about read event Position *EventLogPosition `protobuf:"bytes,1,opt,name=position,proto3" json:"position,omitempty"` // Delete event log position for given subscriber ResetEventlogPosition bool `` /* 127-byte string literal not displayed */ // contains filtered or unexported fields }
func (*EventFetchedRequest) Descriptor
deprecated
added in
v0.3.5
func (*EventFetchedRequest) Descriptor() ([]byte, []int)
Deprecated: Use EventFetchedRequest.ProtoReflect.Descriptor instead.
func (*EventFetchedRequest) GetPosition ¶ added in v0.3.5
func (x *EventFetchedRequest) GetPosition() *EventLogPosition
func (*EventFetchedRequest) GetResetEventlogPosition ¶ added in v0.3.5
func (x *EventFetchedRequest) GetResetEventlogPosition() bool
func (*EventFetchedRequest) ProtoMessage ¶ added in v0.3.5
func (*EventFetchedRequest) ProtoMessage()
func (*EventFetchedRequest) ProtoReflect ¶ added in v0.3.5
func (x *EventFetchedRequest) ProtoReflect() protoreflect.Message
func (*EventFetchedRequest) Reset ¶ added in v0.3.5
func (x *EventFetchedRequest) Reset()
func (*EventFetchedRequest) String ¶ added in v0.3.5
func (x *EventFetchedRequest) String() string
type EventFetchedResponse ¶ added in v0.3.5
type EventFetchedResponse struct {
// contains filtered or unexported fields
}
func (*EventFetchedResponse) Descriptor
deprecated
added in
v0.3.5
func (*EventFetchedResponse) Descriptor() ([]byte, []int)
Deprecated: Use EventFetchedResponse.ProtoReflect.Descriptor instead.
func (*EventFetchedResponse) ProtoMessage ¶ added in v0.3.5
func (*EventFetchedResponse) ProtoMessage()
func (*EventFetchedResponse) ProtoReflect ¶ added in v0.3.5
func (x *EventFetchedResponse) ProtoReflect() protoreflect.Message
func (*EventFetchedResponse) Reset ¶ added in v0.3.5
func (x *EventFetchedResponse) Reset()
func (*EventFetchedResponse) String ¶ added in v0.3.5
func (x *EventFetchedResponse) String() string
type EventLogPosition ¶ added in v0.3.5
type EventLogPosition struct { LogId string `protobuf:"bytes,1,opt,name=log_id,json=logId,proto3" json:"log_id,omitempty"` Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` // contains filtered or unexported fields }
Position in the evenlog to start/resume the events
func (*EventLogPosition) Descriptor
deprecated
added in
v0.3.5
func (*EventLogPosition) Descriptor() ([]byte, []int)
Deprecated: Use EventLogPosition.ProtoReflect.Descriptor instead.
func (*EventLogPosition) GetLogId ¶ added in v0.3.5
func (x *EventLogPosition) GetLogId() string
func (*EventLogPosition) GetOffset ¶ added in v0.3.5
func (x *EventLogPosition) GetOffset() int64
func (*EventLogPosition) ProtoMessage ¶ added in v0.3.5
func (*EventLogPosition) ProtoMessage()
func (*EventLogPosition) ProtoReflect ¶ added in v0.3.5
func (x *EventLogPosition) ProtoReflect() protoreflect.Message
func (*EventLogPosition) Reset ¶ added in v0.3.5
func (x *EventLogPosition) Reset()
func (*EventLogPosition) String ¶ added in v0.3.5
func (x *EventLogPosition) String() string
type EventLogServiceClient ¶
type EventLogServiceClient interface { // FetchEvents streams back events to a caller FetchEvents(ctx context.Context, in *FetchEventsRequest, opts ...grpc.CallOption) (EventLogService_FetchEventsClient, error) // [Optional] EventFetched steams up the notifiactions about fetched events EventFetched(ctx context.Context, opts ...grpc.CallOption) (EventLogService_EventFetchedClient, 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.
func NewEventLogServiceClient ¶
func NewEventLogServiceClient(cc grpc.ClientConnInterface) EventLogServiceClient
type EventLogServiceServer ¶
type EventLogServiceServer interface { // FetchEvents streams back events to a caller FetchEvents(*FetchEventsRequest, EventLogService_FetchEventsServer) error // [Optional] EventFetched steams up the notifiactions about fetched events EventFetched(EventLogService_EventFetchedServer) error // contains filtered or unexported methods }
EventLogServiceServer is the server API for EventLogService service. All implementations must embed UnimplementedEventLogServiceServer for forward compatibility
type EventLogService_EventFetchedClient ¶ added in v0.3.5
type EventLogService_EventFetchedClient interface { Send(*EventFetchedRequest) error CloseAndRecv() (*EventFetchedResponse, error) grpc.ClientStream }
type EventLogService_EventFetchedServer ¶ added in v0.3.5
type EventLogService_EventFetchedServer interface { SendAndClose(*EventFetchedResponse) error Recv() (*EventFetchedRequest, error) grpc.ServerStream }
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
func (EventType) Descriptor ¶
func (EventType) Descriptor() protoreflect.EnumDescriptor
func (EventType) EnumDescriptor
deprecated
func (EventType) Number ¶
func (x EventType) Number() protoreflect.EnumNumber
func (EventType) Type ¶
func (EventType) Type() protoreflect.EnumType
type FetchEventsRequest ¶
type FetchEventsRequest struct { // Position to start event streaming // Empty data treats to stream out the events from the beginning // In case position is not supplied, the events is streamed from the active (current log) Position *EventLogPosition `protobuf:"bytes,1,opt,name=position,proto3" json:"position,omitempty"` // Skip event at given position to implement non inclusive start reading from the given position SkipEventAtPosition bool `protobuf:"varint,2,opt,name=skip_event_at_position,json=skipEventAtPosition,proto3" json:"skip_event_at_position,omitempty"` // event_types contains the list of even types client interested in. // Empty list means all events. Optional. EventTypes []EventType `protobuf:"varint,3,rep,packed,name=event_types,json=eventTypes,proto3,enum=proto.EventType" json:"event_types,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() []EventType
func (*FetchEventsRequest) GetPosition ¶ added in v0.3.5
func (x *FetchEventsRequest) GetPosition() *EventLogPosition
func (*FetchEventsRequest) GetSkipEventAtPosition ¶ added in v0.3.5
func (x *FetchEventsRequest) GetSkipEventAtPosition() bool
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 EventType `protobuf:"varint,1,opt,name=event_type,json=eventType,proto3,enum=proto.EventType" json:"event_type,omitempty"` Timestamp *Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Position *EventLogPosition `protobuf:"bytes,3,opt,name=position,proto3" json:"position,omitempty"` Data []byte `protobuf:"bytes,4,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() EventType
func (*FetchEventsResponse) GetPosition ¶ added in v0.3.5
func (x *FetchEventsResponse) GetPosition() *EventLogPosition
func (*FetchEventsResponse) GetTimestamp ¶
func (x *FetchEventsResponse) GetTimestamp() *Timestamp
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"` Activity *Timestamp `protobuf:"bytes,10,opt,name=activity,proto3" json:"activity,omitempty"` Label string `protobuf:"bytes,11,opt,name=label,proto3" json:"label,omitempty"` BytesDeltaTx uint64 `protobuf:"varint,12,opt,name=bytesDeltaTx,proto3" json:"bytesDeltaTx,omitempty"` BytesDeltaRx uint64 `protobuf:"varint,13,opt,name=bytesDeltaRx,proto3" json:"bytesDeltaRx,omitempty"` Seconds uint64 `protobuf:"varint,14,opt,name=seconds,proto3" json:"seconds,omitempty"` ActivityID string `protobuf:"bytes,15,opt,name=activityID,proto3" json:"activityID,omitempty"` Country string `protobuf:"bytes,16,opt,name=country,proto3" json:"country,omitempty"` // contains filtered or unexported fields }
PeerInfo describes the peer interacting with the tunnel node
func (*PeerInfo) Descriptor
deprecated
func (*PeerInfo) GetActivity ¶ added in v0.3.5
func (*PeerInfo) GetActivityID ¶ added in v0.3.5
func (*PeerInfo) GetBytesDeltaRx ¶ added in v0.3.5
func (*PeerInfo) GetBytesDeltaTx ¶ added in v0.3.5
func (*PeerInfo) GetBytesRx ¶
func (*PeerInfo) GetBytesTx ¶
func (*PeerInfo) GetCountry ¶ added in v0.3.5
func (*PeerInfo) GetCreated ¶
func (*PeerInfo) GetExpires ¶
func (*PeerInfo) GetInstallationID ¶
func (*PeerInfo) GetSeconds ¶ added in v0.3.5
func (*PeerInfo) GetSessionID ¶
func (*PeerInfo) GetUpdated ¶
func (*PeerInfo) ProtoMessage ¶
func (*PeerInfo) ProtoMessage()
func (*PeerInfo) ProtoReflect ¶
func (x *PeerInfo) ProtoReflect() protoreflect.Message
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 ¶
TimestampFromTime converts given std time.Time into Timestamp
func (*Timestamp) Descriptor
deprecated
func (*Timestamp) ProtoMessage ¶
func (*Timestamp) ProtoMessage()
func (*Timestamp) ProtoReflect ¶
func (x *Timestamp) ProtoReflect() protoreflect.Message
type UnimplementedEventLogServiceServer ¶
type UnimplementedEventLogServiceServer struct { }
UnimplementedEventLogServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedEventLogServiceServer) EventFetched ¶ added in v0.3.5
func (UnimplementedEventLogServiceServer) EventFetched(EventLogService_EventFetchedServer) error
func (UnimplementedEventLogServiceServer) FetchEvents ¶
func (UnimplementedEventLogServiceServer) FetchEvents(*FetchEventsRequest, EventLogService_FetchEventsServer) error
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.