alert

package
v0.0.0-...-5e24cfe Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_alert_proto protoreflect.FileDescriptor

Functions

func NewAlertEndpoints

func NewAlertEndpoints() []*api.Endpoint

func RegisterAlertHandler

func RegisterAlertHandler(s server.Server, hdlr AlertHandler, opts ...server.HandlerOption) error

Types

type AlertHandler

type AlertHandler interface {
	// ReportEvent does event ingestions.
	ReportEvent(context.Context, *ReportEventRequest, *ReportEventResponse) error
}

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) Descriptor() ([]byte, []int)

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetAction

func (x *Event) GetAction() string

func (*Event) GetCategory

func (x *Event) GetCategory() string

func (*Event) GetId

func (x *Event) GetId() string

func (*Event) GetLabel

func (x *Event) GetLabel() string

func (*Event) GetMetadata

func (x *Event) GetMetadata() map[string]string

func (*Event) GetValue

func (x *Event) GetValue() uint64

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) ProtoReflect

func (x *Event) ProtoReflect() protoreflect.Message

func (*Event) Reset

func (x *Event) Reset()

func (*Event) String

func (x *Event) String() string

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL