watcher

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WatcherAck

func WatcherAck(esClient *elastic7.Client, cmdOpts *opts.CommandOptions) error

func WatcherActivate

func WatcherActivate(esClient *elastic7.Client, cmdOpts *opts.CommandOptions) error

func WatcherDeactivate

func WatcherDeactivate(esClient *elastic7.Client, cmdOpts *opts.CommandOptions) error

func WatcherDelete

func WatcherDelete(esClient *elastic7.Client, cmdOpts *opts.CommandOptions) error

func WatcherExecute

func WatcherExecute(esClient *elastic7.Client, reader io.Reader, cmdOpts *opts.CommandOptions) error

func WatcherGet

func WatcherGet(esClient *elastic7.Client, cmdOpts *opts.CommandOptions) error

func WatcherGetStats

func WatcherGetStats(esClient *elastic7.Client, cmdOpts *opts.CommandOptions) error

func WatcherList

func WatcherList(esClient *elastic7.Client, cmdOpts *opts.CommandOptions) error

List watchers present on the cluster

func WatcherPut

func WatcherPut(esClient *elastic7.Client, reader io.Reader, cmdOpts *opts.CommandOptions) error

func WatcherServiceStart

func WatcherServiceStart(esClient *elastic7.Client, cmdOpts *opts.CommandOptions) error

/.watches/_search?filter_path=hits.hits._id

func WatcherServiceStop

func WatcherServiceStop(esClient *elastic7.Client, cmdOpts *opts.CommandOptions) error

func WatcherShowActive

func WatcherShowActive(esClient *elastic7.Client, cmdOpts *opts.CommandOptions) error

func WatcherShowInactive

func WatcherShowInactive(esClient *elastic7.Client, cmdOpts *opts.CommandOptions) error

GET /.watches/_search?filter_path=hits.hits._id,hits.hits._source.status.state.active

Types

type GetWatcherCountStruct

type GetWatcherCountStruct struct {
	Count int `json:"count"`
}

type WatcherHits

type WatcherHits struct {
	ID string `json:"_id"`
}

key-containing struct necessary for WatcherListRes struct

type WatcherListOutput

type WatcherListOutput struct {
	Watchers []string `json:"watchers" yaml:"watchers"`
}

Output format for WatcherList function

type WatcherListReq

type WatcherListReq struct {
	Size int `json:"size"`
}

Request body to WatcherList function

type WatcherListRes

type WatcherListRes struct {
	Hits struct {
		Total struct {
			Value    int    `json:"value"`
			Relation string `json:"relation"`
		} `json:"total"`
		Hits []WatcherHits `json:"hits"`
	} `json:"hits"`
}

Expected response for WatcherList function

type WatcherStateResponse

type WatcherStateResponse struct {
	Hits struct {
		Hits []struct {
			ID     string `json:"_id"`
			Source struct {
				Status struct {
					State struct {
						Active bool `json:"active"`
					} `json:"state"`
				} `json:"status"`
			} `json:"_source"`
		} `json:"hits"`
	} `json:"hits"`
}

Jump to

Keyboard shortcuts

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