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 ¶
- Variables
- func RegisterProxyServer(s *grpc.Server, srv ProxyServer)
- type Backend
- func (*Backend) Descriptor() ([]byte, []int)
- func (m *Backend) GetBackendCert() *X509Cert
- func (m *Backend) GetDomain() string
- func (m *Backend) GetHealthCheck() string
- func (m *Backend) GetHealthStatus() string
- func (m *Backend) GetInternetCert() *X509Cert
- func (m *Backend) GetIps() []string
- func (m *Backend) GetMatchHeaders() map[string]string
- func (m *Backend) GetProtocol() Backend_Protocol
- func (*Backend) ProtoMessage()
- func (m *Backend) Reset()
- func (m *Backend) String() string
- type Backend_Protocol
- type KV
- type Key
- type OpResult
- type ProxyClient
- type ProxyServer
- type ProxyState
- type Proxy_GetKVStreamClient
- type Proxy_GetKVStreamServer
- type Proxy_PutKVStreamClient
- type Proxy_PutKVStreamServer
- type StateRequest
- type X509Cert
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) GetBackendCert ¶
func (*Backend) GetHealthCheck ¶
func (*Backend) GetHealthStatus ¶
func (*Backend) GetInternetCert ¶
func (*Backend) GetMatchHeaders ¶
func (*Backend) GetProtocol ¶
func (m *Backend) GetProtocol() Backend_Protocol
func (*Backend) ProtoMessage ¶
func (*Backend) ProtoMessage()
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) ProtoMessage ¶
func (*KV) ProtoMessage()
type Key ¶
type Key struct {
Prefix []byte `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"`
}
func (*Key) Descriptor ¶
func (*Key) ProtoMessage ¶
func (*Key) ProtoMessage()
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) ProtoMessage ¶
func (*OpResult) ProtoMessage()
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_PutKVStreamServer ¶
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) ProtoMessage ¶
func (*X509Cert) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.