etcd

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package etcd provides a component for managing an etcd server using containerd. The component uses host networking with non-default ports (12379 for client, 12380 for peer) to avoid conflicts with existing etcd installations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EtcdComponent

type EtcdComponent struct {
	Log *slog.Logger
	CC  *containerd.Client

	Namespace string
	DataPath  string
	// contains filtered or unexported fields
}

func NewEtcdComponent

func NewEtcdComponent(log *slog.Logger, cc *containerd.Client, namespace, dataPath string) *EtcdComponent

func (*EtcdComponent) ClientEndpoint

func (e *EtcdComponent) ClientEndpoint() string

func (*EtcdComponent) IsRunning

func (e *EtcdComponent) IsRunning() bool

func (*EtcdComponent) PeerEndpoint

func (e *EtcdComponent) PeerEndpoint() string

func (*EtcdComponent) Start

func (e *EtcdComponent) Start(ctx context.Context, config EtcdConfig) error

func (*EtcdComponent) Stop

func (e *EtcdComponent) Stop(ctx context.Context) error

type EtcdConfig

type EtcdConfig struct {
	Name           string
	DataDir        string
	ClientPort     int
	HTTPClientPort int
	PeerPort       int
	InitialToken   string
	ClusterState   string
}

Jump to

Keyboard shortcuts

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