Documentation ¶
Overview ¶
Package events is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterEventsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterEventsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EventsServiceClient) error
- func RegisterEventsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterEventsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EventsServiceServer) error
- func RegisterEventsServiceServer(s *grpc.Server, srv EventsServiceServer)
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetAppName() string
- func (x *Event) GetDestination() string
- func (x *Event) GetEnvirionment() string
- func (x *Event) GetExtract() map[string]string
- func (x *Event) GetGroupName() string
- func (x *Event) GetHostname() string
- func (x *Event) GetLevel() string
- func (x *Event) GetMessage() string
- func (x *Event) GetName() string
- func (x *Event) GetNamespace() string
- func (x *Event) GetProcId() string
- func (x *Event) GetSender() string
- func (x *Event) GetTimestamp() stringdeprecated
- func (x *Event) GetTimestampInt() int64
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- type EventGroupsResponse
- func (*EventGroupsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *EventGroupsResponse) GetGroupNames() []string
- func (*EventGroupsResponse) ProtoMessage()
- func (x *EventGroupsResponse) ProtoReflect() protoreflect.Message
- func (x *EventGroupsResponse) Reset()
- func (x *EventGroupsResponse) String() string
- type EventsFilter
- func (*EventsFilter) Descriptor() ([]byte, []int)deprecated
- func (x *EventsFilter) GetAppName() []string
- func (x *EventsFilter) GetGroupNames() []string
- func (x *EventsFilter) GetHostname() []string
- func (x *EventsFilter) GetLevel() []string
- func (x *EventsFilter) GetNames() []string
- func (x *EventsFilter) GetNamespace() []string
- func (x *EventsFilter) GetProcId() []string
- func (x *EventsFilter) GetSearch() string
- func (x *EventsFilter) GetTimestampEnd() string
- func (x *EventsFilter) GetTimestampStart() string
- func (*EventsFilter) ProtoMessage()
- func (x *EventsFilter) ProtoReflect() protoreflect.Message
- func (x *EventsFilter) Reset()
- func (x *EventsFilter) String() string
- type EventsPostRequest
- func (*EventsPostRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EventsPostRequest) GetCount() uint64
- func (x *EventsPostRequest) GetDestination() string
- func (x *EventsPostRequest) GetFilter() *EventsFilter
- func (x *EventsPostRequest) GetOffset() uint64
- func (x *EventsPostRequest) GetSort() *SortOrder
- func (x *EventsPostRequest) GetTimestampEnd() uint64
- func (x *EventsPostRequest) GetTimestampStart() uint64
- func (*EventsPostRequest) ProtoMessage()
- func (x *EventsPostRequest) ProtoReflect() protoreflect.Message
- func (x *EventsPostRequest) Reset()
- func (x *EventsPostRequest) String() string
- type EventsResponse
- func (*EventsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *EventsResponse) GetCount() int64
- func (x *EventsResponse) GetEvents() []*Event
- func (x *EventsResponse) GetOffset() int64
- func (x *EventsResponse) GetTotalCount() int64
- func (*EventsResponse) ProtoMessage()
- func (x *EventsResponse) ProtoReflect() protoreflect.Message
- func (x *EventsResponse) Reset()
- func (x *EventsResponse) String() string
- type EventsServiceClient
- type EventsServiceServer
- type SortOrder
- type SortOrderEnums
- func (SortOrderEnums) Descriptor() protoreflect.EnumDescriptor
- func (x SortOrderEnums) Enum() *SortOrderEnums
- func (SortOrderEnums) EnumDescriptor() ([]byte, []int)deprecated
- func (x SortOrderEnums) Number() protoreflect.EnumNumber
- func (x SortOrderEnums) String() string
- func (SortOrderEnums) Type() protoreflect.EnumType
- type UnimplementedEventsServiceServer
- func (*UnimplementedEventsServiceServer) CreateEvent(context.Context, *Event) (*emptypb.Empty, error)
- func (*UnimplementedEventsServiceServer) GetEventGroups(context.Context, *emptypb.Empty) (*EventGroupsResponse, error)
- func (*UnimplementedEventsServiceServer) GetEvents(context.Context, *EventsPostRequest) (*EventsResponse, error)
Constants ¶
This section is empty.
Variables ¶
var ( SortOrderEnums_name = map[int32]string{ 0: "UNKNOWN", 1: "ASC", 2: "DESC", } SortOrderEnums_value = map[string]int32{ "UNKNOWN": 0, "ASC": 1, "DESC": 2, } )
Enum value maps for SortOrderEnums.
var File_api_proto_events_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEventsServiceHandler ¶
func RegisterEventsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterEventsServiceHandler registers the http handlers for service EventsService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterEventsServiceHandlerClient ¶
func RegisterEventsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EventsServiceClient) error
RegisterEventsServiceHandlerClient registers the http handlers for service EventsService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "EventsServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "EventsServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "EventsServiceClient" to call the correct interceptors.
func RegisterEventsServiceHandlerFromEndpoint ¶
func RegisterEventsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterEventsServiceHandlerFromEndpoint is same as RegisterEventsServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterEventsServiceHandlerServer ¶
func RegisterEventsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EventsServiceServer) error
RegisterEventsServiceHandlerServer registers the http handlers for service EventsService to "mux". UnaryRPC :call EventsServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterEventsServiceHandlerFromEndpoint instead.
func RegisterEventsServiceServer ¶
func RegisterEventsServiceServer(s *grpc.Server, srv EventsServiceServer)
Types ¶
type Event ¶
type Event struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Level string `protobuf:"bytes,2,opt,name=level,proto3" json:"level,omitempty"` Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` // Deprecated: Do not use. Timestamp string `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Message string `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"` Extract map[string]string `` /* 155-byte string literal not displayed */ Envirionment string `protobuf:"bytes,7,opt,name=envirionment,proto3" json:"envirionment,omitempty"` TimestampInt int64 `protobuf:"varint,8,opt,name=timestamp_int,json=timestampInt,proto3" json:"timestamp_int,omitempty"` Hostname string `protobuf:"bytes,9,opt,name=hostname,proto3" json:"hostname,omitempty"` AppName string `protobuf:"bytes,10,opt,name=appName,proto3" json:"appName,omitempty"` ProcId string `protobuf:"bytes,11,opt,name=procId,proto3" json:"procId,omitempty"` Namespace string `protobuf:"bytes,12,opt,name=namespace,proto3" json:"namespace,omitempty"` Destination string `protobuf:"bytes,13,opt,name=destination,proto3" json:"destination,omitempty"` GroupName string `protobuf:"bytes,14,opt,name=groupName,proto3" json:"groupName,omitempty"` // contains filtered or unexported fields }
func (*Event) Descriptor
deprecated
func (*Event) GetAppName ¶
func (*Event) GetDestination ¶
func (*Event) GetEnvirionment ¶
func (*Event) GetExtract ¶
func (*Event) GetGroupName ¶
func (*Event) GetHostname ¶
func (*Event) GetMessage ¶
func (*Event) GetNamespace ¶
func (*Event) GetTimestamp
deprecated
func (*Event) GetTimestampInt ¶
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
type EventGroupsResponse ¶
type EventGroupsResponse struct { GroupNames []string `protobuf:"bytes,1,rep,name=groupNames,proto3" json:"groupNames,omitempty"` // contains filtered or unexported fields }
func (*EventGroupsResponse) Descriptor
deprecated
func (*EventGroupsResponse) Descriptor() ([]byte, []int)
Deprecated: Use EventGroupsResponse.ProtoReflect.Descriptor instead.
func (*EventGroupsResponse) GetGroupNames ¶
func (x *EventGroupsResponse) GetGroupNames() []string
func (*EventGroupsResponse) ProtoMessage ¶
func (*EventGroupsResponse) ProtoMessage()
func (*EventGroupsResponse) ProtoReflect ¶
func (x *EventGroupsResponse) ProtoReflect() protoreflect.Message
func (*EventGroupsResponse) Reset ¶
func (x *EventGroupsResponse) Reset()
func (*EventGroupsResponse) String ¶
func (x *EventGroupsResponse) String() string
type EventsFilter ¶
type EventsFilter struct { Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"` Search string `protobuf:"bytes,2,opt,name=search,proto3" json:"search,omitempty"` Level []string `protobuf:"bytes,3,rep,name=level,proto3" json:"level,omitempty"` TimestampStart string `protobuf:"bytes,4,opt,name=timestamp_start,json=timestampStart,proto3" json:"timestamp_start,omitempty"` TimestampEnd string `protobuf:"bytes,5,opt,name=timestamp_end,json=timestampEnd,proto3" json:"timestamp_end,omitempty"` Hostname []string `protobuf:"bytes,6,rep,name=hostname,proto3" json:"hostname,omitempty"` AppName []string `protobuf:"bytes,7,rep,name=appName,proto3" json:"appName,omitempty"` ProcId []string `protobuf:"bytes,8,rep,name=procId,proto3" json:"procId,omitempty"` Namespace []string `protobuf:"bytes,9,rep,name=namespace,proto3" json:"namespace,omitempty"` GroupNames []string `protobuf:"bytes,10,rep,name=groupNames,proto3" json:"groupNames,omitempty"` // contains filtered or unexported fields }
func (*EventsFilter) Descriptor
deprecated
func (*EventsFilter) Descriptor() ([]byte, []int)
Deprecated: Use EventsFilter.ProtoReflect.Descriptor instead.
func (*EventsFilter) GetAppName ¶
func (x *EventsFilter) GetAppName() []string
func (*EventsFilter) GetGroupNames ¶
func (x *EventsFilter) GetGroupNames() []string
func (*EventsFilter) GetHostname ¶
func (x *EventsFilter) GetHostname() []string
func (*EventsFilter) GetLevel ¶
func (x *EventsFilter) GetLevel() []string
func (*EventsFilter) GetNames ¶
func (x *EventsFilter) GetNames() []string
func (*EventsFilter) GetNamespace ¶
func (x *EventsFilter) GetNamespace() []string
func (*EventsFilter) GetProcId ¶
func (x *EventsFilter) GetProcId() []string
func (*EventsFilter) GetSearch ¶
func (x *EventsFilter) GetSearch() string
func (*EventsFilter) GetTimestampEnd ¶
func (x *EventsFilter) GetTimestampEnd() string
func (*EventsFilter) GetTimestampStart ¶
func (x *EventsFilter) GetTimestampStart() string
func (*EventsFilter) ProtoMessage ¶
func (*EventsFilter) ProtoMessage()
func (*EventsFilter) ProtoReflect ¶
func (x *EventsFilter) ProtoReflect() protoreflect.Message
func (*EventsFilter) Reset ¶
func (x *EventsFilter) Reset()
func (*EventsFilter) String ¶
func (x *EventsFilter) String() string
type EventsPostRequest ¶
type EventsPostRequest struct { Offset uint64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` Count uint64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` Filter *EventsFilter `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"` Sort *SortOrder `protobuf:"bytes,4,opt,name=sort,proto3" json:"sort,omitempty"` TimestampStart uint64 `protobuf:"varint,5,opt,name=timestamp_start,json=timestampStart,proto3" json:"timestamp_start,omitempty"` TimestampEnd uint64 `protobuf:"varint,6,opt,name=timestamp_end,json=timestampEnd,proto3" json:"timestamp_end,omitempty"` Destination string `protobuf:"bytes,7,opt,name=destination,proto3" json:"destination,omitempty"` // contains filtered or unexported fields }
func (*EventsPostRequest) Descriptor
deprecated
func (*EventsPostRequest) Descriptor() ([]byte, []int)
Deprecated: Use EventsPostRequest.ProtoReflect.Descriptor instead.
func (*EventsPostRequest) GetCount ¶
func (x *EventsPostRequest) GetCount() uint64
func (*EventsPostRequest) GetDestination ¶
func (x *EventsPostRequest) GetDestination() string
func (*EventsPostRequest) GetFilter ¶
func (x *EventsPostRequest) GetFilter() *EventsFilter
func (*EventsPostRequest) GetOffset ¶
func (x *EventsPostRequest) GetOffset() uint64
func (*EventsPostRequest) GetSort ¶
func (x *EventsPostRequest) GetSort() *SortOrder
func (*EventsPostRequest) GetTimestampEnd ¶
func (x *EventsPostRequest) GetTimestampEnd() uint64
func (*EventsPostRequest) GetTimestampStart ¶
func (x *EventsPostRequest) GetTimestampStart() uint64
func (*EventsPostRequest) ProtoMessage ¶
func (*EventsPostRequest) ProtoMessage()
func (*EventsPostRequest) ProtoReflect ¶
func (x *EventsPostRequest) ProtoReflect() protoreflect.Message
func (*EventsPostRequest) Reset ¶
func (x *EventsPostRequest) Reset()
func (*EventsPostRequest) String ¶
func (x *EventsPostRequest) String() string
type EventsResponse ¶
type EventsResponse struct { Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` TotalCount int64 `protobuf:"varint,3,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` Events []*Event `protobuf:"bytes,4,rep,name=events,proto3" json:"events,omitempty"` // contains filtered or unexported fields }
func (*EventsResponse) Descriptor
deprecated
func (*EventsResponse) Descriptor() ([]byte, []int)
Deprecated: Use EventsResponse.ProtoReflect.Descriptor instead.
func (*EventsResponse) GetCount ¶
func (x *EventsResponse) GetCount() int64
func (*EventsResponse) GetEvents ¶
func (x *EventsResponse) GetEvents() []*Event
func (*EventsResponse) GetOffset ¶
func (x *EventsResponse) GetOffset() int64
func (*EventsResponse) GetTotalCount ¶
func (x *EventsResponse) GetTotalCount() int64
func (*EventsResponse) ProtoMessage ¶
func (*EventsResponse) ProtoMessage()
func (*EventsResponse) ProtoReflect ¶
func (x *EventsResponse) ProtoReflect() protoreflect.Message
func (*EventsResponse) Reset ¶
func (x *EventsResponse) Reset()
func (*EventsResponse) String ¶
func (x *EventsResponse) String() string
type EventsServiceClient ¶
type EventsServiceClient interface { GetEvents(ctx context.Context, in *EventsPostRequest, opts ...grpc.CallOption) (*EventsResponse, error) CreateEvent(ctx context.Context, in *Event, opts ...grpc.CallOption) (*emptypb.Empty, error) GetEventGroups(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*EventGroupsResponse, error) }
EventsServiceClient is the client API for EventsService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewEventsServiceClient ¶
func NewEventsServiceClient(cc grpc.ClientConnInterface) EventsServiceClient
type EventsServiceServer ¶
type EventsServiceServer interface { GetEvents(context.Context, *EventsPostRequest) (*EventsResponse, error) CreateEvent(context.Context, *Event) (*emptypb.Empty, error) GetEventGroups(context.Context, *emptypb.Empty) (*EventGroupsResponse, error) }
EventsServiceServer is the server API for EventsService service.
type SortOrder ¶
type SortOrder struct { Attribute string `protobuf:"bytes,1,opt,name=attribute,proto3" json:"attribute,omitempty"` Order SortOrderEnums `protobuf:"varint,2,opt,name=order,proto3,enum=events.SortOrderEnums" json:"order,omitempty"` // contains filtered or unexported fields }
func (*SortOrder) Descriptor
deprecated
func (*SortOrder) GetAttribute ¶
func (*SortOrder) GetOrder ¶
func (x *SortOrder) GetOrder() SortOrderEnums
func (*SortOrder) ProtoMessage ¶
func (*SortOrder) ProtoMessage()
func (*SortOrder) ProtoReflect ¶
func (x *SortOrder) ProtoReflect() protoreflect.Message
type SortOrderEnums ¶
type SortOrderEnums int32
const ( SortOrderEnums_UNKNOWN SortOrderEnums = 0 SortOrderEnums_ASC SortOrderEnums = 1 SortOrderEnums_DESC SortOrderEnums = 2 )
func (SortOrderEnums) Descriptor ¶
func (SortOrderEnums) Descriptor() protoreflect.EnumDescriptor
func (SortOrderEnums) Enum ¶
func (x SortOrderEnums) Enum() *SortOrderEnums
func (SortOrderEnums) EnumDescriptor
deprecated
func (SortOrderEnums) EnumDescriptor() ([]byte, []int)
Deprecated: Use SortOrderEnums.Descriptor instead.
func (SortOrderEnums) Number ¶
func (x SortOrderEnums) Number() protoreflect.EnumNumber
func (SortOrderEnums) String ¶
func (x SortOrderEnums) String() string
func (SortOrderEnums) Type ¶
func (SortOrderEnums) Type() protoreflect.EnumType
type UnimplementedEventsServiceServer ¶
type UnimplementedEventsServiceServer struct { }
UnimplementedEventsServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedEventsServiceServer) CreateEvent ¶
func (*UnimplementedEventsServiceServer) GetEventGroups ¶
func (*UnimplementedEventsServiceServer) GetEventGroups(context.Context, *emptypb.Empty) (*EventGroupsResponse, error)
func (*UnimplementedEventsServiceServer) GetEvents ¶
func (*UnimplementedEventsServiceServer) GetEvents(context.Context, *EventsPostRequest) (*EventsResponse, error)