coordinator

package
v5.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: MIT Imports: 19 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 LogicalIndexCronV6 added in v5.2.0

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

LogicalIndexCronV6 abstracts a group a technical elasticsearchv6 indices, which are accessibles with specific aliases

func NewLogicalIndexCronV6 added in v5.2.0

func NewLogicalIndexCronV6(instanceName string, model modeler.Model) (*LogicalIndexCronV6, error)

func (*LogicalIndexCronV6) FindIndices added in v5.2.0

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

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

func (*LogicalIndexCronV6) GetCron added in v5.2.0

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

type LogicalIndexCronV8 added in v5.2.0

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

LogicalIndexCronV8 abstracts a group a technical elasticsearchv6 indices, which are accessibles with specific aliases

func NewLogicalIndexCronV8 added in v5.2.0

func NewLogicalIndexCronV8(instanceName string, model modeler.Model) (*LogicalIndexCronV8, error)

func (*LogicalIndexCronV8) FindIndices added in v5.2.0

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

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

func (*LogicalIndexCronV8) GetCron added in v5.2.0

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

type LogicalIndexTimeBasedV6 added in v5.2.0

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

LogicalIndex abstracts a group a technical elasticsearchv6 indices, which are accessibles with specific aliases

func NewLogicalIndexTimeBasedV6 added in v5.2.0

func NewLogicalIndexTimeBasedV6(instanceName string, model modeler.Model) (*LogicalIndexTimeBasedV6, error)

func (*LogicalIndexTimeBasedV6) FetchIndices added in v5.2.0

func (logicalIndex *LogicalIndexTimeBasedV6) FetchIndices()

func (*LogicalIndexTimeBasedV6) FindIndices added in v5.2.0

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

func (*LogicalIndexTimeBasedV6) GetCron added in v5.2.0

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

type LogicalIndexTimeBasedV8 added in v5.2.0

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

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

func NewLogicalIndexTimeBasedV8 added in v5.2.0

func NewLogicalIndexTimeBasedV8(instanceName string, model modeler.Model) (*LogicalIndexTimeBasedV8, error)

func (*LogicalIndexTimeBasedV8) FetchIndices added in v5.2.0

func (logicalIndex *LogicalIndexTimeBasedV8) FetchIndices()

func (*LogicalIndexTimeBasedV8) FindIndices added in v5.2.0

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

func (*LogicalIndexTimeBasedV8) GetAllIndices added in v5.2.0

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

func (*LogicalIndexTimeBasedV8) GetCron added in v5.2.0

func (logicalIndex *LogicalIndexTimeBasedV8) 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