etcd

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoSyncInterval

func AutoSyncInterval(v time.Duration) func(*clientv3.Config)

AutoSyncInterval is the interval to update endpoints with its latest members. 0 disables auto-sync. By default auto-sync is disabled.

func Context

func Context(v context.Context) func(*clientv3.Config)

Context is the default client context; it can be used to cancel grpc dial out and other operations that do not have an explicit context.

func DialKeepAliveTime

func DialKeepAliveTime(v time.Duration) func(*clientv3.Config)

DialKeepAliveTime is the time after which client pings the server to see if transport is alive.

func DialKeepAliveTimeout

func DialKeepAliveTimeout(v time.Duration) func(*clientv3.Config)

DialKeepAliveTimeout is the time that the client waits for a response for the keep-alive probe. If the response is not received in this time, the connection is closed.

func DialOptions

func DialOptions(v []grpc.DialOption) func(*clientv3.Config)

DialOptions is a list of dial options for the grpc client (e.g., for interceptors).

func MaxCallRecvMsgSize

func MaxCallRecvMsgSize(v int) func(*clientv3.Config)

MaxCallRecvMsgSize is the client-side response receive limit. If 0, it defaults to "math.MaxInt32", because range response can easily exceed request send limits. Make sure that "MaxCallRecvMsgSize" >= server-side default send/recv limit. ("--max-request-bytes" flag to etcd or "embed.Config.MaxRequestBytes").

func MaxCallSendMsgSize

func MaxCallSendMsgSize(v int) func(*clientv3.Config)

MaxCallSendMsgSize is the client-side request send limit in bytes. If 0, it defaults to 2.0 MiB (2 * 1024 * 1024). Make sure that "MaxCallSendMsgSize" < server-side default send/recv limit. ("--max-request-bytes" flag to etcd or "embed.Config.MaxRequestBytes").

func Noop

func Noop(c *clientv3.Config)

Noop no operations

func Password

func Password(v string) func(*clientv3.Config)

Password is a password for authentication.

func RejectOldCluster

func RejectOldCluster(v bool) func(*clientv3.Config)

RejectOldCluster when set will refuse to create a client against an outdated cluster.

func TLS

func TLS(v *tls.Config) func(*clientv3.Config)

TLS holds the client secure credentials, if any.

func TLSFile

func TLSFile(etcdCertFile, etcdKeyFile string) func(*clientv3.Config)

TLSFile TLS holds the client secure credentials, if any.

func Username

func Username(v string) func(*clientv3.Config)

Username is a user name for authentication.

Types

This section is empty.

Jump to

Keyboard shortcuts

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