Documentation ¶
Index ¶
- Variables
- func RegisterEventLogServiceServer(s grpc.ServiceRegistrar, srv EventLogServiceServer)
- type EventLogServiceClient
- type EventLogServiceServer
- type EventLogService_FetchEventsClient
- type EventLogService_FetchEventsServer
- type EventType
- type FetchEventsRequest
- func (*FetchEventsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FetchEventsRequest) GetEventTypes() []uint32
- func (x *FetchEventsRequest) GetLabels() map[string]string
- func (x *FetchEventsRequest) GetLogID() string
- func (x *FetchEventsRequest) GetOffset() int64
- 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() uint32
- func (x *FetchEventsResponse) GetLogID() string
- func (x *FetchEventsResponse) GetOffset() int64
- func (x *FetchEventsResponse) GetTimestamp() int64
- 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) GetBytesRx() uint64
- func (x *PeerInfo) GetBytesTx() uint64
- func (x *PeerInfo) GetCreated() *Timestamp
- func (x *PeerInfo) GetExpires() *Timestamp
- func (x *PeerInfo) GetInstallationID() string
- 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", } EventType_value = map[string]int32{ "Unspecified": 0, "PeerAdd": 1, "PeerRemove": 2, "PeerUpdate": 3, "PeerTraffic": 4, } )
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, }, }, 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 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.
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 // 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
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 { // 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) GetBytesRx ¶
func (*PeerInfo) GetBytesTx ¶
func (*PeerInfo) GetCreated ¶
func (*PeerInfo) GetExpires ¶
func (*PeerInfo) GetInstallationID ¶
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) 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.