servers

package
v0.0.0-...-eff70b3 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

README

This directory is for helper servers available for use with Cloudprober. Cloudprober itself is a prober daemon with primary purpose to run probes but since it runs on all of our probing VMs, it provides a perfect platform to run servers that can act as the backend for probes that need to access something on cloud.

Documentation

Overview

Package servers is a generated protocol buffer package.

It is generated from these files:

github.com/google/cloudprober/servers/config.proto

It has these top-level messages:

ServerDef

Package servers provides an interface to initialize cloudprober servers using servers config.

Index

Constants

This section is empty.

Variables

View Source
var ServerDef_Type_name = map[int32]string{
	0: "HTTP",
	1: "UDP",
}
View Source
var ServerDef_Type_value = map[string]int32{
	"HTTP": 0,
	"UDP":  1,
}

Functions

This section is empty.

Types

type Server

type Server interface {
	Start(ctx context.Context, dataChan chan<- *metrics.EventMetrics) error
}

Server interface has only one method: Start.

func Init

func Init(initCtx context.Context, serverDefs []*ServerDef) (servers []Server, err error)

Init initializes cloudprober servers, based on the provided config.

type ServerDef

type ServerDef struct {
	Type *ServerDef_Type `protobuf:"varint,1,req,name=type,enum=cloudprober.servers.ServerDef_Type" json:"type,omitempty"`
	// Types that are valid to be assigned to Server:
	//	*ServerDef_HttpServer
	//	*ServerDef_UdpServer
	Server           isServerDef_Server `protobuf_oneof:"server"`
	XXX_unrecognized []byte             `json:"-"`
}

func (*ServerDef) Descriptor

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

func (*ServerDef) GetHttpServer

func (m *ServerDef) GetHttpServer() *cloudprober_servers_http.ServerConf

func (*ServerDef) GetServer

func (m *ServerDef) GetServer() isServerDef_Server

func (*ServerDef) GetType

func (m *ServerDef) GetType() ServerDef_Type

func (*ServerDef) GetUdpServer

func (m *ServerDef) GetUdpServer() *cloudprober_servers_udp.ServerConf

func (*ServerDef) ProtoMessage

func (*ServerDef) ProtoMessage()

func (*ServerDef) Reset

func (m *ServerDef) Reset()

func (*ServerDef) String

func (m *ServerDef) String() string

func (*ServerDef) XXX_OneofFuncs

func (*ServerDef) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type ServerDef_HttpServer

type ServerDef_HttpServer struct {
	HttpServer *cloudprober_servers_http.ServerConf `protobuf:"bytes,2,opt,name=http_server,json=httpServer,oneof"`
}

type ServerDef_Type

type ServerDef_Type int32
const (
	ServerDef_HTTP ServerDef_Type = 0
	ServerDef_UDP  ServerDef_Type = 1
)

func (ServerDef_Type) Enum

func (x ServerDef_Type) Enum() *ServerDef_Type

func (ServerDef_Type) EnumDescriptor

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

func (ServerDef_Type) String

func (x ServerDef_Type) String() string

func (*ServerDef_Type) UnmarshalJSON

func (x *ServerDef_Type) UnmarshalJSON(data []byte) error

type ServerDef_UdpServer

type ServerDef_UdpServer struct {
	UdpServer *cloudprober_servers_udp.ServerConf `protobuf:"bytes,3,opt,name=udp_server,json=udpServer,oneof"`
}

Directories

Path Synopsis
Package http is a generated protocol buffer package.
Package http is a generated protocol buffer package.
udp
Package udp is a generated protocol buffer package.
Package udp is a generated protocol buffer package.
cmd
This binary implements a stand-alone UDP server using the cloudprober/servers/udp/udp package.
This binary implements a stand-alone UDP server using the cloudprober/servers/udp/udp package.

Jump to

Keyboard shortcuts

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