coordinator

package
v5.5.9 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package coordinator implements all features necessary to initialize and monitor elasticsearch components

On-start :

* Load Configuration :

  • Instances + Logical Indices + Cron

* Check if any corresponding indices exists * If so, Check if any corresponding aliases exists * Check if any corresponding templates exists

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitInstance added in v5.2.0

func InitInstance(instanceName string, models map[int64]modeler.Model) error

Types

type Instance

type Instance struct {
	Initialized    bool
	Name           string
	Urls           []string
	LogicalIndices map[string]LogicalIndex
}

Instance represents a functional Myrtea instance

func GetInstance

func GetInstance() *Instance

func (*Instance) LogicalIndex added in v5.2.0

func (i *Instance) LogicalIndex(modelName string) LogicalIndex

type LogicalIndex

type LogicalIndex interface {
	GetCron() *cron.Cron
	FindIndices(t time.Time, depthDays int64) ([]string, error)
}

type LogicalIndexCron added in v5.5.0

type LogicalIndexCron struct {
	Initialized bool
	Name        string
	Cron        *cron.Cron
	Model       modeler.Model
	// contains filtered or unexported fields
}

LogicalIndexCron abstracts a group a technical elasticsearchv8 indices, which are accessibles with specific aliases

func NewLogicalIndexCron added in v5.5.0

func NewLogicalIndexCron(instanceName string, model modeler.Model) (*LogicalIndexCron, error)

func (*LogicalIndexCron) FindIndices added in v5.5.0

func (logicalIndex *LogicalIndexCron) FindIndices(t time.Time, depthDays int64) ([]string, error)

FindIndices search in indices referential every indices between two dates (calculated using current time and depth)

func (*LogicalIndexCron) GetCron added in v5.5.0

func (logicalIndex *LogicalIndexCron) GetCron() *cron.Cron

type LogicalIndexTimeBased added in v5.5.0

type LogicalIndexTimeBased struct {
	Initialized bool
	Name        string
	Cron        *cron.Cron
	Model       modeler.Model
	LiveIndices []string
	// contains filtered or unexported fields
}

LogicalIndexTimeBased abstracts a group a technical elasticsearchv8 indices, which are accessibles with specific aliases

func NewLogicalIndexTimeBased added in v5.5.0

func NewLogicalIndexTimeBased(instanceName string, model modeler.Model) (*LogicalIndexTimeBased, error)

func (*LogicalIndexTimeBased) FetchIndices added in v5.5.0

func (logicalIndex *LogicalIndexTimeBased) FetchIndices()

func (*LogicalIndexTimeBased) FindIndices added in v5.5.0

func (logicalIndex *LogicalIndexTimeBased) FindIndices(t time.Time, depthDays int64) ([]string, error)

func (*LogicalIndexTimeBased) GetAllIndices added in v5.5.0

func (logicalIndex *LogicalIndexTimeBased) GetAllIndices() []string

func (*LogicalIndexTimeBased) GetCron added in v5.5.0

func (logicalIndex *LogicalIndexTimeBased) GetCron() *cron.Cron

type RollMode

type RollMode int

RollMode is a enumeration of all indices roll mode

const (
	// Rollover is the native elasticsearch roll mode, based on /_rollover API
	Rollover RollMode = iota + 1
	// IngestTimebased is ...
	IngestTimebased
)

Jump to

Keyboard shortcuts

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