alertapi

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_alertapi_alertapi_proto protoreflect.FileDescriptor

Functions

func RegisterAlertServiceServer

func RegisterAlertServiceServer(s *grpc.Server, srv AlertServiceServer)

Types

type Alert

type Alert struct {
	ServerName   string `protobuf:"bytes,1,opt,name=serverName,proto3" json:"serverName,omitempty"`
	MetricName   string `protobuf:"bytes,2,opt,name=metricName,proto3" json:"metricName,omitempty"`
	LogId        int64  `protobuf:"varint,3,opt,name=logId,proto3" json:"logId,omitempty"`
	Status       int32  `protobuf:"varint,4,opt,name=status,proto3" json:"status,omitempty"`
	Subject      string `protobuf:"bytes,5,opt,name=subject,proto3" json:"subject,omitempty"`
	Content      string `protobuf:"bytes,6,opt,name=content,proto3" json:"content,omitempty"`
	Timestamp    string `protobuf:"bytes,7,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Resolved     bool   `protobuf:"varint,8,opt,name=resolved,proto3" json:"resolved,omitempty"`
	Disk         string `protobuf:"bytes,9,opt,name=disk,proto3" json:"disk,omitempty"`
	Service      string `protobuf:"bytes,10,opt,name=service,proto3" json:"service,omitempty"`
	Pagerduty    bool   `protobuf:"varint,11,opt,name=pagerduty,proto3" json:"pagerduty,omitempty"`
	Email        bool   `protobuf:"varint,12,opt,name=email,proto3" json:"email,omitempty"`
	Slack        bool   `protobuf:"varint,13,opt,name=slack,proto3" json:"slack,omitempty"`
	SlackChannel string `protobuf:"bytes,14,opt,name=slackChannel,proto3" json:"slackChannel,omitempty"`
	// contains filtered or unexported fields
}

func (*Alert) Descriptor deprecated

func (*Alert) Descriptor() ([]byte, []int)

Deprecated: Use Alert.ProtoReflect.Descriptor instead.

func (*Alert) GetContent

func (x *Alert) GetContent() string

func (*Alert) GetDisk

func (x *Alert) GetDisk() string

func (*Alert) GetEmail

func (x *Alert) GetEmail() bool

func (*Alert) GetLogId

func (x *Alert) GetLogId() int64

func (*Alert) GetMetricName

func (x *Alert) GetMetricName() string

func (*Alert) GetPagerduty

func (x *Alert) GetPagerduty() bool

func (*Alert) GetResolved

func (x *Alert) GetResolved() bool

func (*Alert) GetServerName

func (x *Alert) GetServerName() string

func (*Alert) GetService

func (x *Alert) GetService() string

func (*Alert) GetSlack

func (x *Alert) GetSlack() bool

func (*Alert) GetSlackChannel

func (x *Alert) GetSlackChannel() string

func (*Alert) GetStatus

func (x *Alert) GetStatus() int32

func (*Alert) GetSubject

func (x *Alert) GetSubject() string

func (*Alert) GetTimestamp

func (x *Alert) GetTimestamp() string

func (*Alert) ProtoMessage

func (*Alert) ProtoMessage()

func (*Alert) ProtoReflect

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

func (*Alert) Reset

func (x *Alert) Reset()

func (*Alert) String

func (x *Alert) String() string

type AlertArray

type AlertArray struct {
	Alerts []*Alert `protobuf:"bytes,1,rep,name=alerts,proto3" json:"alerts,omitempty"`
	// contains filtered or unexported fields
}

func (*AlertArray) Descriptor deprecated

func (*AlertArray) Descriptor() ([]byte, []int)

Deprecated: Use AlertArray.ProtoReflect.Descriptor instead.

func (*AlertArray) GetAlerts

func (x *AlertArray) GetAlerts() []*Alert

func (*AlertArray) ProtoMessage

func (*AlertArray) ProtoMessage()

func (*AlertArray) ProtoReflect

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

func (*AlertArray) Reset

func (x *AlertArray) Reset()

func (*AlertArray) String

func (x *AlertArray) String() string

type AlertServiceClient

type AlertServiceClient interface {
	HandleAlerts(ctx context.Context, in *Alert, opts ...grpc.CallOption) (*Response, error)
	AlertRequest(ctx context.Context, in *Request, opts ...grpc.CallOption) (*AlertArray, error)
}

AlertServiceClient is the client API for AlertService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type AlertServiceServer

type AlertServiceServer interface {
	HandleAlerts(context.Context, *Alert) (*Response, error)
	AlertRequest(context.Context, *Request) (*AlertArray, error)
}

AlertServiceServer is the server API for AlertService service.

type Request

type Request struct {
	ServerName string `protobuf:"bytes,1,opt,name=serverName,proto3" json:"serverName,omitempty"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

func (*Request) Descriptor() ([]byte, []int)

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetServerName

func (x *Request) GetServerName() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

type Response struct {
	Success bool   `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Msg     string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

func (*Response) Descriptor() ([]byte, []int)

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetMsg

func (x *Response) GetMsg() string

func (*Response) GetSuccess

func (x *Response) GetSuccess() bool

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type Server

type Server struct {
	Database *memdb.Database
}

func (*Server) AlertRequest

func (s *Server) AlertRequest(ctx context.Context, in *Request) (*AlertArray, error)

func (*Server) HandleAlerts

func (s *Server) HandleAlerts(ctx context.Context, in *Alert) (*Response, error)

type UnimplementedAlertServiceServer

type UnimplementedAlertServiceServer struct {
}

UnimplementedAlertServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedAlertServiceServer) AlertRequest

func (*UnimplementedAlertServiceServer) HandleAlerts

type Void

type Void struct {
	// contains filtered or unexported fields
}

func (*Void) Descriptor deprecated

func (*Void) Descriptor() ([]byte, []int)

Deprecated: Use Void.ProtoReflect.Descriptor instead.

func (*Void) ProtoMessage

func (*Void) ProtoMessage()

func (*Void) ProtoReflect

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

func (*Void) Reset

func (x *Void) Reset()

func (*Void) String

func (x *Void) String() string

Jump to

Keyboard shortcuts

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