pb

package
v0.0.0-...-fd774ef Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KillReason_name = map[int32]string{
	0: "NotKilled",
	1: "Timeout",
	2: "Memory",
	3: "Signal",
}
View Source
var KillReason_value = map[string]int32{
	"NotKilled": 0,
	"Timeout":   1,
	"Memory":    2,
	"Signal":    3,
}
View Source
var ReportReason_name = map[int32]string{
	0: "Unknown",
	1: "Success",
	2: "Failure",
	3: "Alert",
	4: "AlertRate",
	5: "MemoryWarning",
	6: "TimeWarning",
	7: "FileNotCreated",
	8: "Killed",
	9: "Start",
}
View Source
var ReportReason_value = map[string]int32{
	"Unknown":        0,
	"Success":        1,
	"Failure":        2,
	"Alert":          3,
	"AlertRate":      4,
	"MemoryWarning":  5,
	"TimeWarning":    6,
	"FileNotCreated": 7,
	"Killed":         8,
	"Start":          9,
}

Functions

func RegisterReportsServer

func RegisterReportsServer(s *grpc.Server, srv ReportsServer)

Types

type KillReason

type KillReason int32
const (
	KillReason_NotKilled KillReason = 0
	KillReason_Timeout   KillReason = 1
	KillReason_Memory    KillReason = 2
	KillReason_Signal    KillReason = 3
)

func (KillReason) EnumDescriptor

func (KillReason) EnumDescriptor() ([]byte, []int)

func (KillReason) String

func (x KillReason) String() string

type Report

type Report struct {
	Id                   string       `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Hostname             string       `protobuf:"bytes,2,opt,name=hostname,proto3" json:"hostname,omitempty"`
	Stdout               []string     `protobuf:"bytes,3,rep,name=stdout,proto3" json:"stdout,omitempty"`
	Stderr               []string     `protobuf:"bytes,4,rep,name=stderr,proto3" json:"stderr,omitempty"`
	Success              bool         `protobuf:"varint,5,opt,name=success,proto3" json:"success,omitempty"`
	MaxMemory            uint64       `protobuf:"varint,6,opt,name=max_memory,json=maxMemory,proto3" json:"max_memory,omitempty"`
	Killed               bool         `protobuf:"varint,7,opt,name=killed,proto3" json:"killed,omitempty"`
	KillReason           KillReason   `protobuf:"varint,8,opt,name=kill_reason,json=killReason,proto3,enum=monny.monitor.KillReason" json:"kill_reason,omitempty"`
	Created              []byte       `protobuf:"bytes,9,opt,name=created,proto3" json:"created,omitempty"`
	ReportReason         ReportReason `` /* 131-byte string literal not displayed */
	Start                int64        `protobuf:"varint,11,opt,name=start,proto3" json:"start,omitempty"`
	Finish               int64        `protobuf:"varint,12,opt,name=finish,proto3" json:"finish,omitempty"`
	Duration             string       `protobuf:"bytes,13,opt,name=duration,proto3" json:"duration,omitempty"`
	ExitCode             int32        `protobuf:"varint,14,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"`
	ExitCodeValid        bool         `protobuf:"varint,15,opt,name=exit_code_valid,json=exitCodeValid,proto3" json:"exit_code_valid,omitempty"`
	Messages             []string     `protobuf:"bytes,16,rep,name=messages,proto3" json:"messages,omitempty"`
	Matches              []byte       `protobuf:"bytes,17,opt,name=matches,proto3" json:"matches,omitempty"`
	UserCommand          string       `protobuf:"bytes,18,opt,name=user_command,json=userCommand,proto3" json:"user_command,omitempty"`
	Config               []byte       `protobuf:"bytes,19,opt,name=config,proto3" json:"config,omitempty"`
	CreatedAt            int64        `protobuf:"varint,20,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*Report) Descriptor

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

func (*Report) GetConfig

func (m *Report) GetConfig() []byte

func (*Report) GetCreated

func (m *Report) GetCreated() []byte

func (*Report) GetCreatedAt

func (m *Report) GetCreatedAt() int64

func (*Report) GetDuration

func (m *Report) GetDuration() string

func (*Report) GetExitCode

func (m *Report) GetExitCode() int32

func (*Report) GetExitCodeValid

func (m *Report) GetExitCodeValid() bool

func (*Report) GetFinish

func (m *Report) GetFinish() int64

func (*Report) GetHostname

func (m *Report) GetHostname() string

func (*Report) GetId

func (m *Report) GetId() string

func (*Report) GetKillReason

func (m *Report) GetKillReason() KillReason

func (*Report) GetKilled

func (m *Report) GetKilled() bool

func (*Report) GetMatches

func (m *Report) GetMatches() []byte

func (*Report) GetMaxMemory

func (m *Report) GetMaxMemory() uint64

func (*Report) GetMessages

func (m *Report) GetMessages() []string

func (*Report) GetReportReason

func (m *Report) GetReportReason() ReportReason

func (*Report) GetStart

func (m *Report) GetStart() int64

func (*Report) GetStderr

func (m *Report) GetStderr() []string

func (*Report) GetStdout

func (m *Report) GetStdout() []string

func (*Report) GetSuccess

func (m *Report) GetSuccess() bool

func (*Report) GetUserCommand

func (m *Report) GetUserCommand() string

func (*Report) ProtoMessage

func (*Report) ProtoMessage()

func (*Report) Reset

func (m *Report) Reset()

func (*Report) String

func (m *Report) String() string

func (*Report) XXX_DiscardUnknown

func (m *Report) XXX_DiscardUnknown()

func (*Report) XXX_Marshal

func (m *Report) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Report) XXX_Merge

func (m *Report) XXX_Merge(src proto.Message)

func (*Report) XXX_Size

func (m *Report) XXX_Size() int

func (*Report) XXX_Unmarshal

func (m *Report) XXX_Unmarshal(b []byte) error

type ReportAck

type ReportAck struct {
	Success              bool     `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReportAck) Descriptor

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

func (*ReportAck) GetSuccess

func (m *ReportAck) GetSuccess() bool

func (*ReportAck) ProtoMessage

func (*ReportAck) ProtoMessage()

func (*ReportAck) Reset

func (m *ReportAck) Reset()

func (*ReportAck) String

func (m *ReportAck) String() string

func (*ReportAck) XXX_DiscardUnknown

func (m *ReportAck) XXX_DiscardUnknown()

func (*ReportAck) XXX_Marshal

func (m *ReportAck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReportAck) XXX_Merge

func (m *ReportAck) XXX_Merge(src proto.Message)

func (*ReportAck) XXX_Size

func (m *ReportAck) XXX_Size() int

func (*ReportAck) XXX_Unmarshal

func (m *ReportAck) XXX_Unmarshal(b []byte) error

type ReportReason

type ReportReason int32
const (
	ReportReason_Unknown        ReportReason = 0
	ReportReason_Success        ReportReason = 1
	ReportReason_Failure        ReportReason = 2
	ReportReason_Alert          ReportReason = 3
	ReportReason_AlertRate      ReportReason = 4
	ReportReason_MemoryWarning  ReportReason = 5
	ReportReason_TimeWarning    ReportReason = 6
	ReportReason_FileNotCreated ReportReason = 7
	ReportReason_Killed         ReportReason = 8
	ReportReason_Start          ReportReason = 9
)

func (ReportReason) EnumDescriptor

func (ReportReason) EnumDescriptor() ([]byte, []int)

func (ReportReason) String

func (x ReportReason) String() string

type ReportsClient

type ReportsClient interface {
	Create(ctx context.Context, in *Report, opts ...grpc.CallOption) (*ReportAck, error)
}

ReportsClient is the client API for Reports service.

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

func NewReportsClient

func NewReportsClient(cc *grpc.ClientConn) ReportsClient

type ReportsServer

type ReportsServer interface {
	Create(context.Context, *Report) (*ReportAck, error)
}

ReportsServer is the server API for Reports service.

type UnimplementedReportsServer

type UnimplementedReportsServer struct {
}

UnimplementedReportsServer can be embedded to have forward compatible implementations.

func (*UnimplementedReportsServer) Create

Jump to

Keyboard shortcuts

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