config

package
v3.6.0-alpha.0....-58a71a2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientOption

type ClientOption func(any)

ClientOption configures the client with additional parameter. For example, if Auth is enabled, the common test cases just need to use `WithAuth` to return a ClientOption. Note that the common `WithAuth` function calls `e2e.WithAuth` or `integration.WithAuth`, depending on the build tag (either "e2e" or "integration").

type ClusterConfig

type ClusterConfig struct {
	ClusterSize         int
	PeerTLS             TLSConfig
	ClientTLS           TLSConfig
	QuotaBackendBytes   int64
	StrictReconfigCheck bool
	AuthToken           string
	SnapshotCount       uint64

	// ClusterContext is used by "e2e" or "integration" to extend the
	// ClusterConfig. The common test cases shouldn't care about what
	// data is encoded or included; instead "e2e" or "integration"
	// framework should decode or parse it separately.
	ClusterContext any
}

func DefaultClusterConfig

func DefaultClusterConfig() ClusterConfig

func NewClusterConfig

func NewClusterConfig(opts ...ClusterOption) ClusterConfig

type ClusterOption

type ClusterOption func(*ClusterConfig)

func WithClientTLS

func WithClientTLS(tls TLSConfig) ClusterOption

func WithClusterConfig

func WithClusterConfig(cfg ClusterConfig) ClusterOption

func WithClusterSize

func WithClusterSize(size int) ClusterOption

func WithPeerTLS

func WithPeerTLS(tls TLSConfig) ClusterOption

func WithQuotaBackendBytes

func WithQuotaBackendBytes(bytes int64) ClusterOption

func WithSnapshotCount

func WithSnapshotCount(count uint64) ClusterOption

func WithStrictReconfigCheck

func WithStrictReconfigCheck(strict bool) ClusterOption

type CompactOption

type CompactOption struct {
	Physical bool
	Timeout  time.Duration
}

type DefragOption

type DefragOption struct {
	Timeout time.Duration
}

type DeleteOptions

type DeleteOptions struct {
	Prefix  bool
	FromKey bool
	End     string
}

type GetOptions

type GetOptions struct {
	Revision     int
	End          string
	CountOnly    bool
	Serializable bool
	Prefix       bool
	FromKey      bool
	Limit        int
	Order        clientv3.SortOrder
	SortBy       clientv3.SortTarget
	Timeout      time.Duration
}

type LeaseOption

type LeaseOption struct {
	WithAttachedKeys bool
}

type PutOptions

type PutOptions struct {
	LeaseID clientv3.LeaseID
	Timeout time.Duration
}

type TLSConfig

type TLSConfig string
const (
	NoTLS     TLSConfig = ""
	AutoTLS   TLSConfig = "auto-tls"
	ManualTLS TLSConfig = "manual-tls"

	TickDuration = 10 * time.Millisecond
)

type TxnOptions

type TxnOptions struct {
	Interactive bool
}

type UserAddOptions

type UserAddOptions struct {
	NoPassword bool
}

type WatchOptions

type WatchOptions struct {
	Prefix   bool
	Revision int64
	RangeEnd string
}

Jump to

Keyboard shortcuts

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