Documentation ¶
Index ¶
Constants ¶
View Source
const ( ETCDStartTimeout = time.Second * 60 ETCDStopTimeout = time.Second * 10 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmbeddedETCDService ¶
type EmbeddedETCDService struct {
// contains filtered or unexported fields
}
func NewEmbeddedETCDService ¶
func NewEmbeddedETCDService(options EmbeddedETCDServiceOptions) *EmbeddedETCDService
NewEmbeddedETCDService creates a new EmbeddedETCDService instance with the given options and returns a pointer to it.
func (*EmbeddedETCDService) Name ¶
func (s *EmbeddedETCDService) Name() string
Name returns a string "etcd" which is the name of the service.
func (*EmbeddedETCDService) Run ¶
func (s *EmbeddedETCDService) Run(ctx context.Context) error
"Run" creates a temporary directory for etcd to store data and wal files, assigns ports to avoid crosstalk when tests create multiple clusters, sets up logging, and starts an etcd server. If an error occurs, it will return an error.
type EmbeddedETCDServiceOptions ¶
type EmbeddedETCDServiceOptions struct { ClientConfigSink *hosting.AsyncValue[etcdclient.Client] // AssignRandomPorts will choose random ports so that each instance of the etcd service // is isolated. AssignRandomPorts bool // Quiet will prevent etcd from logging to the console. Quiet bool }
Click to show internal directories.
Click to hide internal directories.