server

package
v0.0.0-...-4bb11d9 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2018 License: Apache-2.0, MIT Imports: 5 Imported by: 0

Documentation

Overview

Package server is a generated protocol buffer package.

It is generated from these files:

proto/web.proto

It has these top-level messages:

Backend
X509Cert
Key
KV
ProxyState
OpResult
StateRequest

Index

Constants

This section is empty.

Variables

View Source
var Backend_Protocol_name = map[int32]string{
	0: "HTTP1",
	1: "HTTP2",
	3: "GRPC",
}
View Source
var Backend_Protocol_value = map[string]int32{
	"HTTP1": 0,
	"HTTP2": 1,
	"GRPC":  3,
}

Functions

func RegisterProxyServer

func RegisterProxyServer(s *grpc.Server, srv ProxyServer)

Types

type Backend

type Backend struct {
	Domain       string            `protobuf:"bytes,1,opt,name=domain" json:"domain,omitempty"`
	Ips          []string          `protobuf:"bytes,2,rep,name=ips" json:"ips,omitempty"`
	HealthCheck  string            `protobuf:"bytes,3,opt,name=health_check,json=healthCheck" json:"health_check,omitempty"`
	HealthStatus string            `protobuf:"bytes,4,opt,name=health_status,json=healthStatus" json:"health_status,omitempty"`
	Protocol     Backend_Protocol  `protobuf:"varint,5,opt,name=protocol,enum=web.Backend_Protocol" json:"protocol,omitempty"`
	InternetCert *X509Cert         `protobuf:"bytes,6,opt,name=internet_cert,json=internetCert" json:"internet_cert,omitempty"`
	BackendCert  *X509Cert         `protobuf:"bytes,7,opt,name=backend_cert,json=backendCert" json:"backend_cert,omitempty"`
	MatchHeaders map[string]string `` /* 164-byte string literal not displayed */
}

func (*Backend) Descriptor

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

func (*Backend) GetBackendCert

func (m *Backend) GetBackendCert() *X509Cert

func (*Backend) GetDomain

func (m *Backend) GetDomain() string

func (*Backend) GetHealthCheck

func (m *Backend) GetHealthCheck() string

func (*Backend) GetHealthStatus

func (m *Backend) GetHealthStatus() string

func (*Backend) GetInternetCert

func (m *Backend) GetInternetCert() *X509Cert

func (*Backend) GetIps

func (m *Backend) GetIps() []string

func (*Backend) GetMatchHeaders

func (m *Backend) GetMatchHeaders() map[string]string

func (*Backend) GetProtocol

func (m *Backend) GetProtocol() Backend_Protocol

func (*Backend) ProtoMessage

func (*Backend) ProtoMessage()

func (*Backend) Reset

func (m *Backend) Reset()

func (*Backend) String

func (m *Backend) String() string

type Backend_Protocol

type Backend_Protocol int32
const (
	Backend_HTTP1 Backend_Protocol = 0
	Backend_HTTP2 Backend_Protocol = 1
	Backend_GRPC  Backend_Protocol = 3
)

func (Backend_Protocol) EnumDescriptor

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

func (Backend_Protocol) String

func (x Backend_Protocol) String() string

type KV

type KV struct {
	Key   []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}

func (*KV) Descriptor

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

func (*KV) GetKey

func (m *KV) GetKey() []byte

func (*KV) GetValue

func (m *KV) GetValue() []byte

func (*KV) ProtoMessage

func (*KV) ProtoMessage()

func (*KV) Reset

func (m *KV) Reset()

func (*KV) String

func (m *KV) String() string

type Key

type Key struct {
	Prefix []byte `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"`
}

func (*Key) Descriptor

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

func (*Key) GetPrefix

func (m *Key) GetPrefix() []byte

func (*Key) ProtoMessage

func (*Key) ProtoMessage()

func (*Key) Reset

func (m *Key) Reset()

func (*Key) String

func (m *Key) String() string

type OpResult

type OpResult struct {
	Code   int32  `protobuf:"varint,1,opt,name=code" json:"code,omitempty"`
	Status string `protobuf:"bytes,2,opt,name=status" json:"status,omitempty"`
}

func (*OpResult) Descriptor

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

func (*OpResult) GetCode

func (m *OpResult) GetCode() int32

func (*OpResult) GetStatus

func (m *OpResult) GetStatus() string

func (*OpResult) ProtoMessage

func (*OpResult) ProtoMessage()

func (*OpResult) Reset

func (m *OpResult) Reset()

func (*OpResult) String

func (m *OpResult) String() string

type ProxyClient

type ProxyClient interface {
	State(ctx context.Context, in *StateRequest, opts ...grpc.CallOption) (*ProxyState, error)
	Put(ctx context.Context, in *Backend, opts ...grpc.CallOption) (*OpResult, error)
	Remove(ctx context.Context, in *Backend, opts ...grpc.CallOption) (*OpResult, error)
	PutKVStream(ctx context.Context, opts ...grpc.CallOption) (Proxy_PutKVStreamClient, error)
	GetKVStream(ctx context.Context, in *Key, opts ...grpc.CallOption) (Proxy_GetKVStreamClient, error)
}

func NewProxyClient

func NewProxyClient(cc *grpc.ClientConn) ProxyClient

type ProxyServer

type ProxyServer interface {
	State(context.Context, *StateRequest) (*ProxyState, error)
	Put(context.Context, *Backend) (*OpResult, error)
	Remove(context.Context, *Backend) (*OpResult, error)
	PutKVStream(Proxy_PutKVStreamServer) error
	GetKVStream(*Key, Proxy_GetKVStreamServer) error
}

type ProxyState

type ProxyState struct {
	Backends []*Backend `protobuf:"bytes,1,rep,name=backends" json:"backends,omitempty"`
	// a status message, or an error message.
	Status string `protobuf:"bytes,2,opt,name=status" json:"status,omitempty"`
	// an error code
	Code int32 `protobuf:"varint,3,opt,name=code" json:"code,omitempty"`
}

func (*ProxyState) Descriptor

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

func (*ProxyState) GetBackends

func (m *ProxyState) GetBackends() []*Backend

func (*ProxyState) GetCode

func (m *ProxyState) GetCode() int32

func (*ProxyState) GetStatus

func (m *ProxyState) GetStatus() string

func (*ProxyState) ProtoMessage

func (*ProxyState) ProtoMessage()

func (*ProxyState) Reset

func (m *ProxyState) Reset()

func (*ProxyState) String

func (m *ProxyState) String() string

type Proxy_GetKVStreamClient

type Proxy_GetKVStreamClient interface {
	Recv() (*KV, error)
	grpc.ClientStream
}

type Proxy_GetKVStreamServer

type Proxy_GetKVStreamServer interface {
	Send(*KV) error
	grpc.ServerStream
}

type Proxy_PutKVStreamClient

type Proxy_PutKVStreamClient interface {
	Send(*KV) error
	CloseAndRecv() (*OpResult, error)
	grpc.ClientStream
}

type Proxy_PutKVStreamServer

type Proxy_PutKVStreamServer interface {
	SendAndClose(*OpResult) error
	Recv() (*KV, error)
	grpc.ServerStream
}

type StateRequest

type StateRequest struct {
	// if domain is empty string, return "all" states, otherwise
	// match domain DNS-style, e.g. google.com matches docs.google.com
	Domain string `protobuf:"bytes,1,opt,name=domain" json:"domain,omitempty"`
}

func (*StateRequest) Descriptor

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

func (*StateRequest) GetDomain

func (m *StateRequest) GetDomain() string

func (*StateRequest) ProtoMessage

func (*StateRequest) ProtoMessage()

func (*StateRequest) Reset

func (m *StateRequest) Reset()

func (*StateRequest) String

func (m *StateRequest) String() string

type X509Cert

type X509Cert struct {
	Cert []byte `protobuf:"bytes,1,opt,name=cert,proto3" json:"cert,omitempty"`
	Key  []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
}

func (*X509Cert) Descriptor

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

func (*X509Cert) GetCert

func (m *X509Cert) GetCert() []byte

func (*X509Cert) GetKey

func (m *X509Cert) GetKey() []byte

func (*X509Cert) ProtoMessage

func (*X509Cert) ProtoMessage()

func (*X509Cert) Reset

func (m *X509Cert) Reset()

func (*X509Cert) String

func (m *X509Cert) String() string

Jump to

Keyboard shortcuts

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