Documentation
¶
Overview ¶
Package etcd implements a go-micro/v2/store with etcd
Index ¶
- func AutoSyncInterval(d time.Duration) store.Option
- func ClientContext(ctx context.Context) store.Option
- func DialKeepAliveTime(d time.Duration) store.Option
- func DialKeepAliveTimeout(d time.Duration) store.Option
- func DialOptions(opts []grpc.DialOption) store.Option
- func DialTimeout(d time.Duration) store.Option
- func MaxCallRecvMsgSize(size int) store.Option
- func MaxCallSendMsgSize(size int) store.Option
- func NewStore(opts ...store.Option) store.Store
- func Password(p string) store.Option
- func PermitWithoutStream(b bool) store.Option
- func RejectOldCluster(b bool) store.Option
- func TLS(conf *cryptotls.Config) store.Option
- func Username(u string) store.Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoSyncInterval ¶ added in v2.3.0
AutoSyncInterval is the interval to update endpoints with its latest members. 0 disables auto-sync. By default auto-sync is disabled.
func ClientContext ¶ added in v2.3.0
ClientContext is the default etcd3 client context; it can be used to cancel grpc dial out andother operations that do not have an explicit context.
func DialKeepAliveTime ¶ added in v2.3.0
DialKeepAliveTime is the time after which client pings the server to see if transport is alive.
func DialKeepAliveTimeout ¶ added in v2.3.0
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 ¶ added in v2.3.0
func DialOptions(opts []grpc.DialOption) store.Option
DialOptions is a list of dial options for the grpc client (e.g., for interceptors). For example, pass "grpc.WithBlock()" to block until the underlying connection is up. Without this, Dial returns immediately and connecting the server happens in background.
func DialTimeout ¶ added in v2.3.0
DialTimeout is the timeout for failing to establish a connection.
func MaxCallRecvMsgSize ¶ added in v2.3.0
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 ¶ added in v2.3.0
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 PermitWithoutStream ¶ added in v2.3.0
PermitWithoutStream when set will allow client to send keepalive pings to server without any active streams(RPCs).
func RejectOldCluster ¶ added in v2.3.0
RejectOldCluster when set will refuse to create a client against an outdated cluster.
Types ¶
This section is empty.