etcd: Index | Files | Directories

package grpcproxy

import ""

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


Package Files

auth.go cluster.go doc.go election.go health.go kv.go leader.go lease.go lock.go maintenance.go metrics.go register.go util.go watch.go watch_broadcast.go watch_broadcasts.go watch_ranges.go watcher.go

func AuthStreamClientInterceptor Uses

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

func AuthUnaryClientInterceptor Uses

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

func DelRequestToOp Uses

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

func HandleHealth Uses

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

HandleHealth registers health handler on '/health'.

func HandleMetrics Uses

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

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

func HandleProxyHealth Uses

func HandleProxyHealth(lg *zap.Logger, mux *http.ServeMux, c *clientv3.Client)

HandleProxyHealth registers health handler on '/proxy/health'.

func HandleProxyMetrics Uses

func HandleProxyMetrics(mux *http.ServeMux)

HandleProxyMetrics registers metrics handler on '/proxy/metrics'.

func NewAuthProxy Uses

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

func NewClusterProxy Uses

func NewClusterProxy(lg *zap.Logger, 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 Uses

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

func NewKvProxy Uses

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

func NewLeaseProxy Uses

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

func NewLockProxy Uses

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

func NewMaintenanceProxy Uses

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

func NewWatchProxy Uses

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

func PutRequestToOp Uses

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

func RangeRequestToOp Uses

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

func Register Uses

func Register(lg *zap.Logger, 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 Uses

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

type AuthProxy Uses

type AuthProxy struct {
    // contains filtered or unexported fields

func (*AuthProxy) AuthDisable Uses

func (ap *AuthProxy) AuthDisable(ctx context.Context, r *pb.AuthDisableRequest) (*pb.AuthDisableResponse, error)

func (*AuthProxy) AuthEnable Uses

func (ap *AuthProxy) AuthEnable(ctx context.Context, r *pb.AuthEnableRequest) (*pb.AuthEnableResponse, error)

func (*AuthProxy) AuthStatus Uses

func (ap *AuthProxy) AuthStatus(ctx context.Context, r *pb.AuthStatusRequest) (*pb.AuthStatusResponse, error)

func (*AuthProxy) Authenticate Uses

func (ap *AuthProxy) Authenticate(ctx context.Context, r *pb.AuthenticateRequest) (*pb.AuthenticateResponse, error)

func (*AuthProxy) RoleAdd Uses

func (ap *AuthProxy) RoleAdd(ctx context.Context, r *pb.AuthRoleAddRequest) (*pb.AuthRoleAddResponse, error)

func (*AuthProxy) RoleDelete Uses

func (ap *AuthProxy) RoleDelete(ctx context.Context, r *pb.AuthRoleDeleteRequest) (*pb.AuthRoleDeleteResponse, error)

func (*AuthProxy) RoleGet Uses

func (ap *AuthProxy) RoleGet(ctx context.Context, r *pb.AuthRoleGetRequest) (*pb.AuthRoleGetResponse, error)

func (*AuthProxy) RoleGrantPermission Uses

func (ap *AuthProxy) RoleGrantPermission(ctx context.Context, r *pb.AuthRoleGrantPermissionRequest) (*pb.AuthRoleGrantPermissionResponse, error)

func (*AuthProxy) RoleList Uses

func (ap *AuthProxy) RoleList(ctx context.Context, r *pb.AuthRoleListRequest) (*pb.AuthRoleListResponse, error)

func (*AuthProxy) RoleRevokePermission Uses

func (ap *AuthProxy) RoleRevokePermission(ctx context.Context, r *pb.AuthRoleRevokePermissionRequest) (*pb.AuthRoleRevokePermissionResponse, error)

func (*AuthProxy) UserAdd Uses

func (ap *AuthProxy) UserAdd(ctx context.Context, r *pb.AuthUserAddRequest) (*pb.AuthUserAddResponse, error)

func (*AuthProxy) UserChangePassword Uses

func (ap *AuthProxy) UserChangePassword(ctx context.Context, r *pb.AuthUserChangePasswordRequest) (*pb.AuthUserChangePasswordResponse, error)

func (*AuthProxy) UserDelete Uses

func (ap *AuthProxy) UserDelete(ctx context.Context, r *pb.AuthUserDeleteRequest) (*pb.AuthUserDeleteResponse, error)

func (*AuthProxy) UserGet Uses

func (ap *AuthProxy) UserGet(ctx context.Context, r *pb.AuthUserGetRequest) (*pb.AuthUserGetResponse, error)

func (*AuthProxy) UserGrantRole Uses

func (ap *AuthProxy) UserGrantRole(ctx context.Context, r *pb.AuthUserGrantRoleRequest) (*pb.AuthUserGrantRoleResponse, error)

func (*AuthProxy) UserList Uses

func (ap *AuthProxy) UserList(ctx context.Context, r *pb.AuthUserListRequest) (*pb.AuthUserListResponse, error)

func (*AuthProxy) UserRevokeRole Uses

func (ap *AuthProxy) UserRevokeRole(ctx context.Context, r *pb.AuthUserRevokeRoleRequest) (*pb.AuthUserRevokeRoleResponse, error)


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

Package grpcproxy imports 35 packages (graph) and is imported by 151 packages. Updated 2020-09-24. Refresh now. Tools for package owners.