grpcproxy

package
v3.3.18 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2019 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Overview

Package grpcproxy is an OSI level 7 proxy for etcd v3 API requests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthStreamClientInterceptor added in v3.3.0

func AuthStreamClientInterceptor(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption) (grpc.ClientStream, error)

func AuthUnaryClientInterceptor added in v3.3.0

func AuthUnaryClientInterceptor(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error

func DelRequestToOp

func DelRequestToOp(r *pb.DeleteRangeRequest) clientv3.Op

func HandleHealth added in v3.3.0

func HandleHealth(mux *http.ServeMux, c *clientv3.Client)

HandleHealth registers health handler on '/health'.

func HandleMetrics added in v3.3.13

func HandleMetrics(mux *http.ServeMux, c *http.Client, eps []string)

HandleMetrics performs a GET request against etcd endpoint and returns '/metrics'.

func NewAuthProxy added in v3.1.0

func NewAuthProxy(c *clientv3.Client) pb.AuthServer

func NewClusterProxy added in v3.1.0

func NewClusterProxy(c *clientv3.Client, advaddr string, prefix string) (pb.ClusterServer, <-chan struct{})

NewClusterProxy takes optional prefix to fetch grpc-proxy member endpoints. The returned channel is closed when there is grpc-proxy endpoint registered and the client's context is canceled so the 'register' loop returns.

func NewElectionProxy added in v3.2.0

func NewElectionProxy(client *clientv3.Client) v3electionpb.ElectionServer

func NewKvProxy

func NewKvProxy(c *clientv3.Client) (pb.KVServer, <-chan struct{})

func NewLeaseProxy added in v3.1.0

func NewLeaseProxy(c *clientv3.Client) (pb.LeaseServer, <-chan struct{})

func NewLockProxy added in v3.2.0

func NewLockProxy(client *clientv3.Client) v3lockpb.LockServer

func NewMaintenanceProxy added in v3.1.0

func NewMaintenanceProxy(c *clientv3.Client) pb.MaintenanceServer

func NewWatchProxy added in v3.1.0

func NewWatchProxy(c *clientv3.Client) (pb.WatchServer, <-chan struct{})

func PutRequestToOp

func PutRequestToOp(r *pb.PutRequest) clientv3.Op

func RangeRequestToOp

func RangeRequestToOp(r *pb.RangeRequest) clientv3.Op

func Register added in v3.2.0

func Register(c *clientv3.Client, prefix string, addr string, ttl int) <-chan struct{}

Register registers itself as a grpc-proxy server by writing prefixed-key with session of specified TTL (in seconds). The returned channel is closed when the client's context is canceled.

func TxnRequestToOp added in v3.3.0

func TxnRequestToOp(r *pb.TxnRequest) clientv3.Op

Types

type AuthProxy added in v3.1.0

type AuthProxy struct {
	// contains filtered or unexported fields
}

func (*AuthProxy) AuthDisable added in v3.1.0

func (*AuthProxy) AuthEnable added in v3.1.0

func (*AuthProxy) Authenticate added in v3.1.0

func (*AuthProxy) RoleAdd added in v3.1.0

func (*AuthProxy) RoleDelete added in v3.1.0

func (*AuthProxy) RoleGet added in v3.1.0

func (*AuthProxy) RoleGrantPermission added in v3.1.0

func (*AuthProxy) RoleList added in v3.1.0

func (*AuthProxy) RoleRevokePermission added in v3.1.0

func (*AuthProxy) UserAdd added in v3.1.0

func (*AuthProxy) UserChangePassword added in v3.1.0

func (*AuthProxy) UserDelete added in v3.1.0

func (*AuthProxy) UserGet added in v3.1.0

func (*AuthProxy) UserGrantRole added in v3.1.0

func (*AuthProxy) UserList added in v3.1.0

func (*AuthProxy) UserRevokeRole added in v3.1.0

Directories

Path Synopsis
Package adapter provides gRPC adapters between client and server gRPC interfaces without needing to go through a gRPC connection.
Package adapter provides gRPC adapters between client and server gRPC interfaces without needing to go through a gRPC connection.
Package cache exports functionality for efficiently caching and mapping `RangeRequest`s to corresponding `RangeResponse`s.
Package cache exports functionality for efficiently caching and mapping `RangeRequest`s to corresponding `RangeResponse`s.

Jump to

Keyboard shortcuts

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