Documentation ¶
Index ¶
- Variables
- func NewAlertEndpoints() []*api.Endpoint
- func RegisterAlertHandler(s server.Server, hdlr AlertHandler, opts ...server.HandlerOption) error
- func RegisterAlertServer(s grpc.ServiceRegistrar, srv AlertServer)
- type AlertClient
- type AlertHandler
- type AlertServer
- type AlertService
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetAction() string
- func (x *Event) GetCategory() string
- func (x *Event) GetId() string
- func (x *Event) GetLabel() string
- func (x *Event) GetMetadata() map[string]string
- func (x *Event) GetValue() uint64
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- type ReportEventRequest
- func (*ReportEventRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ReportEventRequest) GetEvent() *Event
- func (*ReportEventRequest) ProtoMessage()
- func (x *ReportEventRequest) ProtoReflect() protoreflect.Message
- func (x *ReportEventRequest) Reset()
- func (x *ReportEventRequest) String() string
- type ReportEventResponse
- type UnimplementedAlertServer
- type UnsafeAlertServer
Constants ¶
This section is empty.
Variables ¶
var Alert_ServiceDesc = grpc.ServiceDesc{ ServiceName: "alert.Alert", HandlerType: (*AlertServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ReportEvent", Handler: _Alert_ReportEvent_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/alert/alert.proto", }
Alert_ServiceDesc is the grpc.ServiceDesc for Alert service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_proto_alert_alert_proto protoreflect.FileDescriptor
Functions ¶
func NewAlertEndpoints ¶
func RegisterAlertHandler ¶
func RegisterAlertHandler(s server.Server, hdlr AlertHandler, opts ...server.HandlerOption) error
func RegisterAlertServer ¶
func RegisterAlertServer(s grpc.ServiceRegistrar, srv AlertServer)
Types ¶
type AlertClient ¶
type AlertClient interface { // ReportEvent does event ingestions. ReportEvent(ctx context.Context, in *ReportEventRequest, opts ...grpc.CallOption) (*ReportEventResponse, error) }
AlertClient is the client API for Alert 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 NewAlertClient ¶
func NewAlertClient(cc grpc.ClientConnInterface) AlertClient
type AlertHandler ¶
type AlertHandler interface { // ReportEvent does event ingestions. ReportEvent(context.Context, *ReportEventRequest, *ReportEventResponse) error }
type AlertServer ¶
type AlertServer interface { // ReportEvent does event ingestions. ReportEvent(context.Context, *ReportEventRequest) (*ReportEventResponse, error) // contains filtered or unexported methods }
AlertServer is the server API for Alert service. All implementations must embed UnimplementedAlertServer for forward compatibility
type AlertService ¶
type AlertService interface { // ReportEvent does event ingestions. ReportEvent(ctx context.Context, in *ReportEventRequest, opts ...client.CallOption) (*ReportEventResponse, error) }
func NewAlertService ¶
func NewAlertService(name string, c client.Client) AlertService
type Event ¶
type Event struct { // id is not required for inserts Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Category string `protobuf:"bytes,2,opt,name=category,proto3" json:"category,omitempty"` Action string `protobuf:"bytes,3,opt,name=action,proto3" json:"action,omitempty"` Label string `protobuf:"bytes,4,opt,name=label,proto3" json:"label,omitempty"` Value uint64 `protobuf:"varint,5,opt,name=value,proto3" json:"value,omitempty"` Metadata map[string]string `` /* 157-byte string literal not displayed */ // contains filtered or unexported fields }
Event is inspired by Google Analytics events https://developers.google.com/analytics/devguides/collection/analyticsjs/events
func (*Event) Descriptor
deprecated
func (*Event) GetCategory ¶
func (*Event) GetMetadata ¶
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
type ReportEventRequest ¶
type ReportEventRequest struct { Event *Event `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` // contains filtered or unexported fields }
func (*ReportEventRequest) Descriptor
deprecated
func (*ReportEventRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReportEventRequest.ProtoReflect.Descriptor instead.
func (*ReportEventRequest) GetEvent ¶
func (x *ReportEventRequest) GetEvent() *Event
func (*ReportEventRequest) ProtoMessage ¶
func (*ReportEventRequest) ProtoMessage()
func (*ReportEventRequest) ProtoReflect ¶
func (x *ReportEventRequest) ProtoReflect() protoreflect.Message
func (*ReportEventRequest) Reset ¶
func (x *ReportEventRequest) Reset()
func (*ReportEventRequest) String ¶
func (x *ReportEventRequest) String() string
type ReportEventResponse ¶
type ReportEventResponse struct {
// contains filtered or unexported fields
}
func (*ReportEventResponse) Descriptor
deprecated
func (*ReportEventResponse) Descriptor() ([]byte, []int)
Deprecated: Use ReportEventResponse.ProtoReflect.Descriptor instead.
func (*ReportEventResponse) ProtoMessage ¶
func (*ReportEventResponse) ProtoMessage()
func (*ReportEventResponse) ProtoReflect ¶
func (x *ReportEventResponse) ProtoReflect() protoreflect.Message
func (*ReportEventResponse) Reset ¶
func (x *ReportEventResponse) Reset()
func (*ReportEventResponse) String ¶
func (x *ReportEventResponse) String() string
type UnimplementedAlertServer ¶
type UnimplementedAlertServer struct { }
UnimplementedAlertServer must be embedded to have forward compatible implementations.
func (UnimplementedAlertServer) ReportEvent ¶
func (UnimplementedAlertServer) ReportEvent(context.Context, *ReportEventRequest) (*ReportEventResponse, error)
type UnsafeAlertServer ¶ added in v3.10.4
type UnsafeAlertServer interface {
// contains filtered or unexported methods
}
UnsafeAlertServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AlertServer will result in compilation errors.