proxy

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2018 License: MIT Imports: 7 Imported by: 2

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 InfoRequest added in v0.2.0

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

func (*InfoRequest) Descriptor added in v0.2.0

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

func (*InfoRequest) ProtoMessage added in v0.2.0

func (*InfoRequest) ProtoMessage()

func (*InfoRequest) Reset added in v0.2.0

func (m *InfoRequest) Reset()

func (*InfoRequest) String added in v0.2.0

func (m *InfoRequest) String() string

func (*InfoRequest) XXX_DiscardUnknown added in v0.2.0

func (m *InfoRequest) XXX_DiscardUnknown()

func (*InfoRequest) XXX_Marshal added in v0.2.0

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

func (*InfoRequest) XXX_Merge added in v0.2.0

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

func (*InfoRequest) XXX_Size added in v0.2.0

func (m *InfoRequest) XXX_Size() int

func (*InfoRequest) XXX_Unmarshal added in v0.2.0

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

type InfoResponse added in v0.2.0

type InfoResponse struct {
	ID                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*InfoResponse) Descriptor added in v0.2.0

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

func (*InfoResponse) GetID added in v0.2.0

func (m *InfoResponse) GetID() string

func (*InfoResponse) ProtoMessage added in v0.2.0

func (*InfoResponse) ProtoMessage()

func (*InfoResponse) Reset added in v0.2.0

func (m *InfoResponse) Reset()

func (*InfoResponse) String added in v0.2.0

func (m *InfoResponse) String() string

func (*InfoResponse) XXX_DiscardUnknown added in v0.2.0

func (m *InfoResponse) XXX_DiscardUnknown()

func (*InfoResponse) XXX_Marshal added in v0.2.0

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

func (*InfoResponse) XXX_Merge added in v0.2.0

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

func (*InfoResponse) XXX_Size added in v0.2.0

func (m *InfoResponse) XXX_Size() int

func (*InfoResponse) XXX_Unmarshal added in v0.2.0

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

type ProxyClient

type ProxyClient interface {
	Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error)
	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 {
	Info(context.Context, *InfoRequest) (*InfoResponse, error)
	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