Documentation
¶
Index ¶
- Variables
- func RegisterAlertServiceServer(s *grpc.Server, srv AlertServiceServer)
- type Alert
- func (*Alert) Descriptor() ([]byte, []int)deprecated
- func (x *Alert) GetContent() string
- func (x *Alert) GetDisk() string
- func (x *Alert) GetEmail() bool
- func (x *Alert) GetLogId() int64
- func (x *Alert) GetMetricName() string
- func (x *Alert) GetPagerduty() bool
- func (x *Alert) GetResolved() bool
- func (x *Alert) GetServerName() string
- func (x *Alert) GetService() string
- func (x *Alert) GetSlack() bool
- func (x *Alert) GetSlackChannel() string
- func (x *Alert) GetStatus() int32
- func (x *Alert) GetSubject() string
- func (x *Alert) GetTimestamp() string
- func (*Alert) ProtoMessage()
- func (x *Alert) ProtoReflect() protoreflect.Message
- func (x *Alert) Reset()
- func (x *Alert) String() string
- type AlertArray
- type AlertServiceClient
- type AlertServiceServer
- type Request
- type Response
- type Server
- type UnimplementedAlertServiceServer
- type Void
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) GetContent ¶
func (*Alert) GetMetricName ¶
func (*Alert) GetPagerduty ¶
func (*Alert) GetResolved ¶
func (*Alert) GetServerName ¶
func (*Alert) GetService ¶
func (*Alert) GetSlackChannel ¶
func (*Alert) GetSubject ¶
func (*Alert) GetTimestamp ¶
func (*Alert) ProtoMessage ¶
func (*Alert) ProtoMessage()
func (*Alert) ProtoReflect ¶
func (x *Alert) ProtoReflect() protoreflect.Message
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.
func NewAlertServiceClient ¶
func NewAlertServiceClient(cc grpc.ClientConnInterface) AlertServiceClient
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) GetServerName ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
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) GetSuccess ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type Server ¶
func (*Server) AlertRequest ¶
type UnimplementedAlertServiceServer ¶
type UnimplementedAlertServiceServer struct { }
UnimplementedAlertServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedAlertServiceServer) AlertRequest ¶
func (*UnimplementedAlertServiceServer) AlertRequest(context.Context, *Request) (*AlertArray, error)
func (*UnimplementedAlertServiceServer) HandleAlerts ¶
type Void ¶
type Void struct {
// contains filtered or unexported fields
}
func (*Void) Descriptor
deprecated
func (*Void) ProtoMessage ¶
func (*Void) ProtoMessage()
func (*Void) ProtoReflect ¶
func (x *Void) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.