alert

package
v3.10.13 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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)

View Source
var File_proto_alert_alert_proto protoreflect.FileDescriptor

Functions

func NewAlertEndpoints

func NewAlertEndpoints() []*api.Endpoint

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) 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

type UnimplementedAlertServer

type UnimplementedAlertServer struct {
}

UnimplementedAlertServer must be embedded to have forward compatible implementations.

func (UnimplementedAlertServer) ReportEvent

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.

Jump to

Keyboard shortcuts

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