metastore

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: AGPL-3.0 Imports: 54 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompactionConfig

type CompactionConfig struct {
	JobLeaseDuration time.Duration `yaml:"job_lease_duration"`
	JobMaxFailures   int           `yaml:"job_max_failures"`
}

func (*CompactionConfig) RegisterFlagsWithPrefix

func (cfg *CompactionConfig) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet)

type Config

type Config struct {
	Address           string            `yaml:"address"`
	GRPCClientConfig  grpcclient.Config `yaml:"grpc_client_config" doc:"description=Configures the gRPC client used to communicate with the metastore."`
	DataDir           string            `yaml:"data_dir"`
	Raft              RaftConfig        `yaml:"raft"`
	Compaction        CompactionConfig  `yaml:"compaction_config"`
	MinReadyDuration  time.Duration     `yaml:"min_ready_duration" category:"advanced"`
	DLQRecoveryPeriod time.Duration     `yaml:"dlq_recovery_period" category:"advanced"`
}

func (*Config) RegisterFlags

func (cfg *Config) RegisterFlags(f *flag.FlagSet)

func (*Config) Validate

func (cfg *Config) Validate() error

type FSM

type FSM struct {
	// contains filtered or unexported fields
}

func (*FSM) Apply

func (fsm *FSM) Apply(l *raft.Log) interface{}

func (*FSM) Restore

func (fsm *FSM) Restore(snapshot io.ReadCloser) error

func (*FSM) Snapshot

func (fsm *FSM) Snapshot() (raft.FSMSnapshot, error)

type Limits

type Limits interface{}

type Metastore

type Metastore struct {
	metastorev1.MetastoreServiceServer
	metastorev1.OperatorServiceServer
	compactorv1.CompactionPlannerServer
	// contains filtered or unexported fields
}

func New

func New(config Config, limits Limits, logger log.Logger, reg prometheus.Registerer, client *metastoreclient.Client, bucket objstore.Bucket) (*Metastore, error)

func (*Metastore) AddBlock

func (*Metastore) AddRecoveredBlock added in v1.9.0

func (*Metastore) CheckReady

func (m *Metastore) CheckReady(ctx context.Context) (err error)

func (*Metastore) QueryMetadata

func (*Metastore) ReadIndex

func (*Metastore) Service

func (m *Metastore) Service() services.Service

func (*Metastore) Shutdown

func (m *Metastore) Shutdown() error

type RaftConfig

type RaftConfig struct {
	Dir string `yaml:"dir"`

	BootstrapPeers       []string `yaml:"bootstrap_peers"`
	BootstrapExpectPeers int      `yaml:"bootstrap_expect_peers"`

	ServerID         string `yaml:"server_id"`
	BindAddress      string `yaml:"bind_address"`
	AdvertiseAddress string `yaml:"advertise_address"`

	ApplyTimeout time.Duration `yaml:"apply_timeout" doc:"hidden"`
}

func (*RaftConfig) RegisterFlagsWithPrefix

func (cfg *RaftConfig) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet)

func (*RaftConfig) Validate

func (cfg *RaftConfig) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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