report

package
v0.0.0-...-fb6b401 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package report is a generated protocol buffer package.

It is generated from these files:

report.proto

It has these top-level messages:

ReportRequest
ReportResponse
InfoRequest
DiskInfo
ClientInfo
InfoResponse

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterReportServer

func RegisterReportServer(s *grpc.Server, srv ReportServer)

Types

type ClientInfo

type ClientInfo struct {
	Id              string      `protobuf:"bytes,13,opt,name=id" json:"id,omitempty"`
	AllowedSshKeys  string      `protobuf:"bytes,1,opt,name=allowed_ssh_keys,json=allowedSshKeys" json:"allowed_ssh_keys,omitempty"`
	CpuArch         string      `protobuf:"bytes,2,opt,name=cpu_arch,json=cpuArch" json:"cpu_arch,omitempty"`
	Disks           []*DiskInfo `protobuf:"bytes,3,rep,name=disks" json:"disks,omitempty"`
	Hostname        string      `protobuf:"bytes,4,opt,name=hostname" json:"hostname,omitempty"`
	KernelName      string      `protobuf:"bytes,5,opt,name=kernel_name,json=kernelName" json:"kernel_name,omitempty"`
	KernelVersion   string      `protobuf:"bytes,6,opt,name=kernel_version,json=kernelVersion" json:"kernel_version,omitempty"`
	CpuArchitecture string      `protobuf:"bytes,7,opt,name=cpu_architecture,json=cpuArchitecture" json:"cpu_architecture,omitempty"`
	Platform        string      `protobuf:"bytes,8,opt,name=platform" json:"platform,omitempty"`
	MemoryTotalMb   string      `protobuf:"bytes,9,opt,name=memory_total_mb,json=memoryTotalMb" json:"memory_total_mb,omitempty"`
	MemoryAvailMb   string      `protobuf:"bytes,10,opt,name=memory_avail_mb,json=memoryAvailMb" json:"memory_avail_mb,omitempty"`
	Tags            []string    `protobuf:"bytes,11,rep,name=tags" json:"tags,omitempty"`
	Zone            string      `protobuf:"bytes,12,opt,name=zone" json:"zone,omitempty"`
}

ClientInfo describes info for one client.

func (*ClientInfo) Descriptor

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

func (*ClientInfo) GetAllowedSshKeys

func (m *ClientInfo) GetAllowedSshKeys() string

func (*ClientInfo) GetCpuArch

func (m *ClientInfo) GetCpuArch() string

func (*ClientInfo) GetCpuArchitecture

func (m *ClientInfo) GetCpuArchitecture() string

func (*ClientInfo) GetDisks

func (m *ClientInfo) GetDisks() []*DiskInfo

func (*ClientInfo) GetHostname

func (m *ClientInfo) GetHostname() string

func (*ClientInfo) GetId

func (m *ClientInfo) GetId() string

func (*ClientInfo) GetKernelName

func (m *ClientInfo) GetKernelName() string

func (*ClientInfo) GetKernelVersion

func (m *ClientInfo) GetKernelVersion() string

func (*ClientInfo) GetMemoryAvailMb

func (m *ClientInfo) GetMemoryAvailMb() string

func (*ClientInfo) GetMemoryTotalMb

func (m *ClientInfo) GetMemoryTotalMb() string

func (*ClientInfo) GetPlatform

func (m *ClientInfo) GetPlatform() string

func (*ClientInfo) GetTags

func (m *ClientInfo) GetTags() []string

func (*ClientInfo) GetZone

func (m *ClientInfo) GetZone() string

func (*ClientInfo) ProtoMessage

func (*ClientInfo) ProtoMessage()

func (*ClientInfo) Reset

func (m *ClientInfo) Reset()

func (*ClientInfo) String

func (m *ClientInfo) String() string

type DiskInfo

type DiskInfo struct {
	Source      string `protobuf:"bytes,1,opt,name=source" json:"source,omitempty"`
	Size        string `protobuf:"bytes,2,opt,name=size" json:"size,omitempty"`
	PercentUsed string `protobuf:"bytes,3,opt,name=percent_used,json=percentUsed" json:"percent_used,omitempty"`
	Target      string `protobuf:"bytes,4,opt,name=target" json:"target,omitempty"`
}

DiskInfo describes info on one disk partition.

func (*DiskInfo) Descriptor

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

func (*DiskInfo) GetPercentUsed

func (m *DiskInfo) GetPercentUsed() string

func (*DiskInfo) GetSize

func (m *DiskInfo) GetSize() string

func (*DiskInfo) GetSource

func (m *DiskInfo) GetSource() string

func (*DiskInfo) GetTarget

func (m *DiskInfo) GetTarget() string

func (*DiskInfo) ProtoMessage

func (*DiskInfo) ProtoMessage()

func (*DiskInfo) Reset

func (m *DiskInfo) Reset()

func (*DiskInfo) String

func (m *DiskInfo) String() string

type InfoRequest

type InfoRequest struct {
}

InfoRequest describes a request to look up info on known clients.

func (*InfoRequest) Descriptor

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

func (*InfoRequest) ProtoMessage

func (*InfoRequest) ProtoMessage()

func (*InfoRequest) Reset

func (m *InfoRequest) Reset()

func (*InfoRequest) String

func (m *InfoRequest) String() string

type InfoResponse

type InfoResponse struct {
	// The info field describes each known client and their info.
	Info map[string]*ClientInfo `` /* 128-byte string literal not displayed */
}

InfoResponse describes a response for info on known clients.

func (*InfoResponse) Descriptor

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

func (*InfoResponse) GetInfo

func (m *InfoResponse) GetInfo() map[string]*ClientInfo

func (*InfoResponse) ProtoMessage

func (*InfoResponse) ProtoMessage()

func (*InfoResponse) Reset

func (m *InfoResponse) Reset()

func (*InfoResponse) String

func (m *InfoResponse) String() string

type ReportClient

type ReportClient interface {
	// Send report to server.
	Send(ctx context.Context, in *ReportRequest, opts ...grpc.CallOption) (*ReportResponse, error)
	// Query for info on known clients.
	Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error)
}

func NewReportClient

func NewReportClient(cc *grpc.ClientConn) ReportClient

type ReportRequest

type ReportRequest struct {
	Ts   *google_protobuf1.Timestamp `protobuf:"bytes,2,opt,name=ts" json:"ts,omitempty"`
	Info *ClientInfo                 `protobuf:"bytes,3,opt,name=info" json:"info,omitempty"`
}

ReportRequest describes the request to report in from a client.

func (*ReportRequest) Descriptor

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

func (*ReportRequest) GetInfo

func (m *ReportRequest) GetInfo() *ClientInfo

func (*ReportRequest) GetTs

func (*ReportRequest) ProtoMessage

func (*ReportRequest) ProtoMessage()

func (*ReportRequest) Reset

func (m *ReportRequest) Reset()

func (*ReportRequest) String

func (m *ReportRequest) String() string

type ReportResponse

type ReportResponse struct {
	Message string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"`
}

ReportResponse describes the response from the server when a client reports in.

func (*ReportResponse) Descriptor

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

func (*ReportResponse) GetMessage

func (m *ReportResponse) GetMessage() string

func (*ReportResponse) ProtoMessage

func (*ReportResponse) ProtoMessage()

func (*ReportResponse) Reset

func (m *ReportResponse) Reset()

func (*ReportResponse) String

func (m *ReportResponse) String() string

type ReportServer

type ReportServer interface {
	// Send report to server.
	Send(context.Context, *ReportRequest) (*ReportResponse, error)
	// Query for info on known clients.
	Info(context.Context, *InfoRequest) (*InfoResponse, error)
}

Jump to

Keyboard shortcuts

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