proxy

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2018 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterProxyServer

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

Types

type Backend

type Backend struct {
	Host                 string      `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	Upstreams            []*Upstream `protobuf:"bytes,2,rep,name=upstreams" json:"upstreams,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*Backend) Descriptor

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

func (*Backend) GetHost

func (m *Backend) GetHost() string

func (*Backend) GetUpstreams

func (m *Backend) GetUpstreams() []*Upstream

func (*Backend) ProtoMessage

func (*Backend) ProtoMessage()

func (*Backend) Reset

func (m *Backend) Reset()

func (*Backend) String

func (m *Backend) String() string

func (*Backend) XXX_DiscardUnknown

func (m *Backend) XXX_DiscardUnknown()

func (*Backend) XXX_Marshal

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

func (*Backend) XXX_Merge

func (dst *Backend) XXX_Merge(src proto.Message)

func (*Backend) XXX_Size

func (m *Backend) XXX_Size() int

func (*Backend) XXX_Unmarshal

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

type BackendRequest

type BackendRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*BackendRequest) Descriptor

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

func (*BackendRequest) ProtoMessage

func (*BackendRequest) ProtoMessage()

func (*BackendRequest) Reset

func (m *BackendRequest) Reset()

func (*BackendRequest) String

func (m *BackendRequest) String() string

func (*BackendRequest) XXX_DiscardUnknown

func (m *BackendRequest) XXX_DiscardUnknown()

func (*BackendRequest) XXX_Marshal

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

func (*BackendRequest) XXX_Merge

func (dst *BackendRequest) XXX_Merge(src proto.Message)

func (*BackendRequest) XXX_Size

func (m *BackendRequest) XXX_Size() int

func (*BackendRequest) XXX_Unmarshal

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

type BackendResponse

type BackendResponse struct {
	Backends             []*Backend `protobuf:"bytes,1,rep,name=backends" json:"backends,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*BackendResponse) Descriptor

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

func (*BackendResponse) GetBackends

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

func (*BackendResponse) ProtoMessage

func (*BackendResponse) ProtoMessage()

func (*BackendResponse) Reset

func (m *BackendResponse) Reset()

func (*BackendResponse) String

func (m *BackendResponse) String() string

func (*BackendResponse) XXX_DiscardUnknown

func (m *BackendResponse) XXX_DiscardUnknown()

func (*BackendResponse) XXX_Marshal

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

func (*BackendResponse) XXX_Merge

func (dst *BackendResponse) XXX_Merge(src proto.Message)

func (*BackendResponse) XXX_Size

func (m *BackendResponse) XXX_Size() int

func (*BackendResponse) XXX_Unmarshal

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

type ProxyClient

type ProxyClient interface {
	Reload(ctx context.Context, in *ReloadRequest, opts ...grpc.CallOption) (*types.Empty, error)
	Backends(ctx context.Context, in *BackendRequest, opts ...grpc.CallOption) (*BackendResponse, error)
}

ProxyClient is the client API for Proxy service.

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

func NewProxyClient

func NewProxyClient(cc *grpc.ClientConn) ProxyClient

type ProxyServer

type ProxyServer interface {
	Reload(context.Context, *ReloadRequest) (*types.Empty, error)
	Backends(context.Context, *BackendRequest) (*BackendResponse, error)
}

ProxyServer is the server API for Proxy service.

type ReloadRequest

type ReloadRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReloadRequest) Descriptor

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

func (*ReloadRequest) ProtoMessage

func (*ReloadRequest) ProtoMessage()

func (*ReloadRequest) Reset

func (m *ReloadRequest) Reset()

func (*ReloadRequest) String

func (m *ReloadRequest) String() string

func (*ReloadRequest) XXX_DiscardUnknown

func (m *ReloadRequest) XXX_DiscardUnknown()

func (*ReloadRequest) XXX_Marshal

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

func (*ReloadRequest) XXX_Merge

func (dst *ReloadRequest) XXX_Merge(src proto.Message)

func (*ReloadRequest) XXX_Size

func (m *ReloadRequest) XXX_Size() int

func (*ReloadRequest) XXX_Unmarshal

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

type Upstream

type Upstream struct {
	Address              string          `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Latency              *types.Duration `protobuf:"bytes,2,opt,name=latency" json:"latency,omitempty"`
	Status               string          `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*Upstream) Descriptor

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

func (*Upstream) GetAddress

func (m *Upstream) GetAddress() string

func (*Upstream) GetLatency

func (m *Upstream) GetLatency() *types.Duration

func (*Upstream) GetStatus

func (m *Upstream) GetStatus() string

func (*Upstream) ProtoMessage

func (*Upstream) ProtoMessage()

func (*Upstream) Reset

func (m *Upstream) Reset()

func (*Upstream) String

func (m *Upstream) String() string

func (*Upstream) XXX_DiscardUnknown

func (m *Upstream) XXX_DiscardUnknown()

func (*Upstream) XXX_Marshal

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

func (*Upstream) XXX_Merge

func (dst *Upstream) XXX_Merge(src proto.Message)

func (*Upstream) XXX_Size

func (m *Upstream) XXX_Size() int

func (*Upstream) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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