Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterWaspAuditRecorderServer(s *grpc.Server, srv WaspAuditRecorderServer)
- type GetWaspEventsRequest
- func (*GetWaspEventsRequest) Descriptor() ([]byte, []int)
- func (m *GetWaspEventsRequest) GetFromTimestamp() int64
- func (*GetWaspEventsRequest) ProtoMessage()
- func (m *GetWaspEventsRequest) Reset()
- func (m *GetWaspEventsRequest) String() string
- func (m *GetWaspEventsRequest) XXX_DiscardUnknown()
- func (m *GetWaspEventsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetWaspEventsRequest) XXX_Merge(src proto.Message)
- func (m *GetWaspEventsRequest) XXX_Size() int
- func (m *GetWaspEventsRequest) XXX_Unmarshal(b []byte) error
- type GetWaspEventsResponse
- func (*GetWaspEventsResponse) Descriptor() ([]byte, []int)
- func (m *GetWaspEventsResponse) GetEvents() []*WaspAuditEvent
- func (*GetWaspEventsResponse) ProtoMessage()
- func (m *GetWaspEventsResponse) Reset()
- func (m *GetWaspEventsResponse) String() string
- func (m *GetWaspEventsResponse) XXX_DiscardUnknown()
- func (m *GetWaspEventsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetWaspEventsResponse) XXX_Merge(src proto.Message)
- func (m *GetWaspEventsResponse) XXX_Size() int
- func (m *GetWaspEventsResponse) XXX_Unmarshal(b []byte) error
- type PutWaspEventRequest
- func (*PutWaspEventRequest) Descriptor() ([]byte, []int)
- func (m *PutWaspEventRequest) GetEvents() []*WaspEvent
- func (*PutWaspEventRequest) ProtoMessage()
- func (m *PutWaspEventRequest) Reset()
- func (m *PutWaspEventRequest) String() string
- func (m *PutWaspEventRequest) XXX_DiscardUnknown()
- func (m *PutWaspEventRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PutWaspEventRequest) XXX_Merge(src proto.Message)
- func (m *PutWaspEventRequest) XXX_Size() int
- func (m *PutWaspEventRequest) XXX_Unmarshal(b []byte) error
- type PutWaspWaspEventsResponse
- func (*PutWaspWaspEventsResponse) Descriptor() ([]byte, []int)
- func (*PutWaspWaspEventsResponse) ProtoMessage()
- func (m *PutWaspWaspEventsResponse) Reset()
- func (m *PutWaspWaspEventsResponse) String() string
- func (m *PutWaspWaspEventsResponse) XXX_DiscardUnknown()
- func (m *PutWaspWaspEventsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PutWaspWaspEventsResponse) XXX_Merge(src proto.Message)
- func (m *PutWaspWaspEventsResponse) XXX_Size() int
- func (m *PutWaspWaspEventsResponse) XXX_Unmarshal(b []byte) error
- type Recorder
- type UnimplementedWaspAuditRecorderServer
- type WaspAuditEvent
- func (*WaspAuditEvent) Descriptor() ([]byte, []int)
- func (m *WaspAuditEvent) GetAttributes() []*WaspEventAttribute
- func (m *WaspAuditEvent) GetKind() string
- func (m *WaspAuditEvent) GetService() string
- func (m *WaspAuditEvent) GetTenant() string
- func (m *WaspAuditEvent) GetTimestamp() int64
- func (*WaspAuditEvent) ProtoMessage()
- func (m *WaspAuditEvent) Reset()
- func (m *WaspAuditEvent) String() string
- func (m *WaspAuditEvent) XXX_DiscardUnknown()
- func (m *WaspAuditEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WaspAuditEvent) XXX_Merge(src proto.Message)
- func (m *WaspAuditEvent) XXX_Size() int
- func (m *WaspAuditEvent) XXX_Unmarshal(b []byte) error
- type WaspAuditRecorderClient
- type WaspAuditRecorderServer
- type WaspAuditRecorder_GetWaspEventsClient
- type WaspAuditRecorder_GetWaspEventsServer
- type WaspEvent
- func (*WaspEvent) Descriptor() ([]byte, []int)
- func (m *WaspEvent) GetAttributes() []*WaspEventAttribute
- func (m *WaspEvent) GetKind() string
- func (m *WaspEvent) GetTenant() string
- func (m *WaspEvent) GetTimestamp() int64
- func (*WaspEvent) ProtoMessage()
- func (m *WaspEvent) Reset()
- func (m *WaspEvent) String() string
- func (m *WaspEvent) XXX_DiscardUnknown()
- func (m *WaspEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WaspEvent) XXX_Merge(src proto.Message)
- func (m *WaspEvent) XXX_Size() int
- func (m *WaspEvent) XXX_Unmarshal(b []byte) error
- type WaspEventAttribute
- func (*WaspEventAttribute) Descriptor() ([]byte, []int)
- func (m *WaspEventAttribute) GetKey() string
- func (m *WaspEventAttribute) GetValue() string
- func (*WaspEventAttribute) ProtoMessage()
- func (m *WaspEventAttribute) Reset()
- func (m *WaspEventAttribute) String() string
- func (m *WaspEventAttribute) XXX_DiscardUnknown()
- func (m *WaspEventAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WaspEventAttribute) XXX_Merge(src proto.Message)
- func (m *WaspEventAttribute) XXX_Size() int
- func (m *WaspEventAttribute) XXX_Unmarshal(b []byte) error
Constants ¶
View Source
const ( SessionConnected event = "session_connected" SessionDisonnected event = "session_disconnected" SubscriptionCreated event = "subscription_created" SubscriptionDeleted event = "subscription_deleted" PeerLost event = "peer_lost" )
Variables ¶
View Source
var FuncMap = template.FuncMap{ "humanBytes": func(n int64) string { return humanize.Bytes(uint64(n)) }, "bytesToString": func(b []byte) string { return string(b) }, "shorten": func(s string) string { return s[0:8] }, "parseDate": func(i int64) string { return time.Unix(0, i).Format(time.RFC3339) }, "timeToDuration": func(i int64) string { return humanize.Time(time.Unix(i, 0)) }, }
Functions ¶
func RegisterWaspAuditRecorderServer ¶ added in v1.4.0
func RegisterWaspAuditRecorderServer(s *grpc.Server, srv WaspAuditRecorderServer)
Types ¶
type GetWaspEventsRequest ¶ added in v1.7.0
type GetWaspEventsRequest struct { FromTimestamp int64 `protobuf:"varint,1,opt,name=FromTimestamp,proto3" json:"FromTimestamp,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetWaspEventsRequest) Descriptor ¶ added in v1.7.0
func (*GetWaspEventsRequest) Descriptor() ([]byte, []int)
func (*GetWaspEventsRequest) GetFromTimestamp ¶ added in v1.7.0
func (m *GetWaspEventsRequest) GetFromTimestamp() int64
func (*GetWaspEventsRequest) ProtoMessage ¶ added in v1.7.0
func (*GetWaspEventsRequest) ProtoMessage()
func (*GetWaspEventsRequest) Reset ¶ added in v1.7.0
func (m *GetWaspEventsRequest) Reset()
func (*GetWaspEventsRequest) String ¶ added in v1.7.0
func (m *GetWaspEventsRequest) String() string
func (*GetWaspEventsRequest) XXX_DiscardUnknown ¶ added in v1.7.0
func (m *GetWaspEventsRequest) XXX_DiscardUnknown()
func (*GetWaspEventsRequest) XXX_Marshal ¶ added in v1.7.0
func (m *GetWaspEventsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetWaspEventsRequest) XXX_Merge ¶ added in v1.7.0
func (m *GetWaspEventsRequest) XXX_Merge(src proto.Message)
func (*GetWaspEventsRequest) XXX_Size ¶ added in v1.7.0
func (m *GetWaspEventsRequest) XXX_Size() int
func (*GetWaspEventsRequest) XXX_Unmarshal ¶ added in v1.7.0
func (m *GetWaspEventsRequest) XXX_Unmarshal(b []byte) error
type GetWaspEventsResponse ¶ added in v1.7.0
type GetWaspEventsResponse struct { Events []*WaspAuditEvent `protobuf:"bytes,1,rep,name=Events,proto3" json:"Events,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetWaspEventsResponse) Descriptor ¶ added in v1.7.0
func (*GetWaspEventsResponse) Descriptor() ([]byte, []int)
func (*GetWaspEventsResponse) GetEvents ¶ added in v1.7.0
func (m *GetWaspEventsResponse) GetEvents() []*WaspAuditEvent
func (*GetWaspEventsResponse) ProtoMessage ¶ added in v1.7.0
func (*GetWaspEventsResponse) ProtoMessage()
func (*GetWaspEventsResponse) Reset ¶ added in v1.7.0
func (m *GetWaspEventsResponse) Reset()
func (*GetWaspEventsResponse) String ¶ added in v1.7.0
func (m *GetWaspEventsResponse) String() string
func (*GetWaspEventsResponse) XXX_DiscardUnknown ¶ added in v1.7.0
func (m *GetWaspEventsResponse) XXX_DiscardUnknown()
func (*GetWaspEventsResponse) XXX_Marshal ¶ added in v1.7.0
func (m *GetWaspEventsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetWaspEventsResponse) XXX_Merge ¶ added in v1.7.0
func (m *GetWaspEventsResponse) XXX_Merge(src proto.Message)
func (*GetWaspEventsResponse) XXX_Size ¶ added in v1.7.0
func (m *GetWaspEventsResponse) XXX_Size() int
func (*GetWaspEventsResponse) XXX_Unmarshal ¶ added in v1.7.0
func (m *GetWaspEventsResponse) XXX_Unmarshal(b []byte) error
type PutWaspEventRequest ¶ added in v1.4.0
type PutWaspEventRequest struct { Events []*WaspEvent `protobuf:"bytes,1,rep,name=Events,proto3" json:"Events,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PutWaspEventRequest) Descriptor ¶ added in v1.4.0
func (*PutWaspEventRequest) Descriptor() ([]byte, []int)
func (*PutWaspEventRequest) GetEvents ¶ added in v1.4.0
func (m *PutWaspEventRequest) GetEvents() []*WaspEvent
func (*PutWaspEventRequest) ProtoMessage ¶ added in v1.4.0
func (*PutWaspEventRequest) ProtoMessage()
func (*PutWaspEventRequest) Reset ¶ added in v1.4.0
func (m *PutWaspEventRequest) Reset()
func (*PutWaspEventRequest) String ¶ added in v1.4.0
func (m *PutWaspEventRequest) String() string
func (*PutWaspEventRequest) XXX_DiscardUnknown ¶ added in v1.4.0
func (m *PutWaspEventRequest) XXX_DiscardUnknown()
func (*PutWaspEventRequest) XXX_Marshal ¶ added in v1.4.0
func (m *PutWaspEventRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PutWaspEventRequest) XXX_Merge ¶ added in v1.4.0
func (m *PutWaspEventRequest) XXX_Merge(src proto.Message)
func (*PutWaspEventRequest) XXX_Size ¶ added in v1.4.0
func (m *PutWaspEventRequest) XXX_Size() int
func (*PutWaspEventRequest) XXX_Unmarshal ¶ added in v1.4.0
func (m *PutWaspEventRequest) XXX_Unmarshal(b []byte) error
type PutWaspWaspEventsResponse ¶ added in v1.4.0
type PutWaspWaspEventsResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PutWaspWaspEventsResponse) Descriptor ¶ added in v1.4.0
func (*PutWaspWaspEventsResponse) Descriptor() ([]byte, []int)
func (*PutWaspWaspEventsResponse) ProtoMessage ¶ added in v1.4.0
func (*PutWaspWaspEventsResponse) ProtoMessage()
func (*PutWaspWaspEventsResponse) Reset ¶ added in v1.4.0
func (m *PutWaspWaspEventsResponse) Reset()
func (*PutWaspWaspEventsResponse) String ¶ added in v1.4.0
func (m *PutWaspWaspEventsResponse) String() string
func (*PutWaspWaspEventsResponse) XXX_DiscardUnknown ¶ added in v1.4.0
func (m *PutWaspWaspEventsResponse) XXX_DiscardUnknown()
func (*PutWaspWaspEventsResponse) XXX_Marshal ¶ added in v1.4.0
func (m *PutWaspWaspEventsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PutWaspWaspEventsResponse) XXX_Merge ¶ added in v1.4.0
func (m *PutWaspWaspEventsResponse) XXX_Merge(src proto.Message)
func (*PutWaspWaspEventsResponse) XXX_Size ¶ added in v1.4.0
func (m *PutWaspWaspEventsResponse) XXX_Size() int
func (*PutWaspWaspEventsResponse) XXX_Unmarshal ¶ added in v1.4.0
func (m *PutWaspWaspEventsResponse) XXX_Unmarshal(b []byte) error
type Recorder ¶
type Recorder interface { RecordEvent(tenant string, eventKind event, payload map[string]string) error Consume(ctx context.Context, consumer func(timestamp int64, tenant, service, eventKind string, payload map[string]string)) error }
func GRPCRecorder ¶ added in v1.4.0
func GRPCRecorder(remote *grpc.ClientConn, logger *zap.Logger) Recorder
func NoneRecorder ¶
func NoneRecorder() Recorder
func StdoutRecorder ¶
func StdoutRecorder() Recorder
type UnimplementedWaspAuditRecorderServer ¶ added in v1.4.0
type UnimplementedWaspAuditRecorderServer struct { }
UnimplementedWaspAuditRecorderServer can be embedded to have forward compatible implementations.
func (*UnimplementedWaspAuditRecorderServer) GetWaspEvents ¶ added in v1.7.0
func (*UnimplementedWaspAuditRecorderServer) GetWaspEvents(req *GetWaspEventsRequest, srv WaspAuditRecorder_GetWaspEventsServer) error
func (*UnimplementedWaspAuditRecorderServer) PutWaspEvents ¶ added in v1.4.0
func (*UnimplementedWaspAuditRecorderServer) PutWaspEvents(ctx context.Context, req *PutWaspEventRequest) (*PutWaspWaspEventsResponse, error)
type WaspAuditEvent ¶ added in v1.7.0
type WaspAuditEvent struct { Timestamp int64 `protobuf:"varint,1,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"` Tenant string `protobuf:"bytes,2,opt,name=Tenant,proto3" json:"Tenant,omitempty"` Service string `protobuf:"bytes,3,opt,name=Service,proto3" json:"Service,omitempty"` Kind string `protobuf:"bytes,4,opt,name=Kind,proto3" json:"Kind,omitempty"` Attributes []*WaspEventAttribute `protobuf:"bytes,5,rep,name=Attributes,proto3" json:"Attributes,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*WaspAuditEvent) Descriptor ¶ added in v1.7.0
func (*WaspAuditEvent) Descriptor() ([]byte, []int)
func (*WaspAuditEvent) GetAttributes ¶ added in v1.7.0
func (m *WaspAuditEvent) GetAttributes() []*WaspEventAttribute
func (*WaspAuditEvent) GetKind ¶ added in v1.7.0
func (m *WaspAuditEvent) GetKind() string
func (*WaspAuditEvent) GetService ¶ added in v1.7.0
func (m *WaspAuditEvent) GetService() string
func (*WaspAuditEvent) GetTenant ¶ added in v1.7.0
func (m *WaspAuditEvent) GetTenant() string
func (*WaspAuditEvent) GetTimestamp ¶ added in v1.7.0
func (m *WaspAuditEvent) GetTimestamp() int64
func (*WaspAuditEvent) ProtoMessage ¶ added in v1.7.0
func (*WaspAuditEvent) ProtoMessage()
func (*WaspAuditEvent) Reset ¶ added in v1.7.0
func (m *WaspAuditEvent) Reset()
func (*WaspAuditEvent) String ¶ added in v1.7.0
func (m *WaspAuditEvent) String() string
func (*WaspAuditEvent) XXX_DiscardUnknown ¶ added in v1.7.0
func (m *WaspAuditEvent) XXX_DiscardUnknown()
func (*WaspAuditEvent) XXX_Marshal ¶ added in v1.7.0
func (m *WaspAuditEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*WaspAuditEvent) XXX_Merge ¶ added in v1.7.0
func (m *WaspAuditEvent) XXX_Merge(src proto.Message)
func (*WaspAuditEvent) XXX_Size ¶ added in v1.7.0
func (m *WaspAuditEvent) XXX_Size() int
func (*WaspAuditEvent) XXX_Unmarshal ¶ added in v1.7.0
func (m *WaspAuditEvent) XXX_Unmarshal(b []byte) error
type WaspAuditRecorderClient ¶ added in v1.4.0
type WaspAuditRecorderClient interface { PutWaspEvents(ctx context.Context, in *PutWaspEventRequest, opts ...grpc.CallOption) (*PutWaspWaspEventsResponse, error) GetWaspEvents(ctx context.Context, in *GetWaspEventsRequest, opts ...grpc.CallOption) (WaspAuditRecorder_GetWaspEventsClient, error) }
WaspAuditRecorderClient is the client API for WaspAuditRecorder service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewWaspAuditRecorderClient ¶ added in v1.4.0
func NewWaspAuditRecorderClient(cc *grpc.ClientConn) WaspAuditRecorderClient
type WaspAuditRecorderServer ¶ added in v1.4.0
type WaspAuditRecorderServer interface { PutWaspEvents(context.Context, *PutWaspEventRequest) (*PutWaspWaspEventsResponse, error) GetWaspEvents(*GetWaspEventsRequest, WaspAuditRecorder_GetWaspEventsServer) error }
WaspAuditRecorderServer is the server API for WaspAuditRecorder service.
type WaspAuditRecorder_GetWaspEventsClient ¶ added in v1.7.0
type WaspAuditRecorder_GetWaspEventsClient interface { Recv() (*GetWaspEventsResponse, error) grpc.ClientStream }
type WaspAuditRecorder_GetWaspEventsServer ¶ added in v1.7.0
type WaspAuditRecorder_GetWaspEventsServer interface { Send(*GetWaspEventsResponse) error grpc.ServerStream }
type WaspEvent ¶ added in v1.4.0
type WaspEvent struct { Timestamp int64 `protobuf:"varint,1,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"` Tenant string `protobuf:"bytes,2,opt,name=Tenant,proto3" json:"Tenant,omitempty"` Kind string `protobuf:"bytes,3,opt,name=Kind,proto3" json:"Kind,omitempty"` Attributes []*WaspEventAttribute `protobuf:"bytes,4,rep,name=Attributes,proto3" json:"Attributes,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*WaspEvent) Descriptor ¶ added in v1.4.0
func (*WaspEvent) GetAttributes ¶ added in v1.4.0
func (m *WaspEvent) GetAttributes() []*WaspEventAttribute
func (*WaspEvent) GetTimestamp ¶ added in v1.4.0
func (*WaspEvent) ProtoMessage ¶ added in v1.4.0
func (*WaspEvent) ProtoMessage()
func (*WaspEvent) XXX_DiscardUnknown ¶ added in v1.4.0
func (m *WaspEvent) XXX_DiscardUnknown()
func (*WaspEvent) XXX_Marshal ¶ added in v1.4.0
func (*WaspEvent) XXX_Unmarshal ¶ added in v1.4.0
type WaspEventAttribute ¶ added in v1.4.0
type WaspEventAttribute 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*WaspEventAttribute) Descriptor ¶ added in v1.4.0
func (*WaspEventAttribute) Descriptor() ([]byte, []int)
func (*WaspEventAttribute) GetKey ¶ added in v1.4.0
func (m *WaspEventAttribute) GetKey() string
func (*WaspEventAttribute) GetValue ¶ added in v1.4.0
func (m *WaspEventAttribute) GetValue() string
func (*WaspEventAttribute) ProtoMessage ¶ added in v1.4.0
func (*WaspEventAttribute) ProtoMessage()
func (*WaspEventAttribute) Reset ¶ added in v1.4.0
func (m *WaspEventAttribute) Reset()
func (*WaspEventAttribute) String ¶ added in v1.4.0
func (m *WaspEventAttribute) String() string
func (*WaspEventAttribute) XXX_DiscardUnknown ¶ added in v1.4.0
func (m *WaspEventAttribute) XXX_DiscardUnknown()
func (*WaspEventAttribute) XXX_Marshal ¶ added in v1.4.0
func (m *WaspEventAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*WaspEventAttribute) XXX_Merge ¶ added in v1.4.0
func (m *WaspEventAttribute) XXX_Merge(src proto.Message)
func (*WaspEventAttribute) XXX_Size ¶ added in v1.4.0
func (m *WaspEventAttribute) XXX_Size() int
func (*WaspEventAttribute) XXX_Unmarshal ¶ added in v1.4.0
func (m *WaspEventAttribute) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.