status

package
v2.3.1-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PluginName declares public plugin name.
	PluginName = "status"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

type Checker interface {
	Status() Status
}

Checker interface used to get latest status from plugin

type Config

type Config struct {
	// Address of the http server
	Address string
	// Status code returned in case of fail, 503 by default
	UnavailableStatusCode int `mapstructure:"unavailable_status_code"`
}

Config is the configuration reference for the Status plugin

func (*Config) InitDefaults added in v2.0.4

func (c *Config) InitDefaults()

InitDefaults configuration options

type Plugin

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

func (*Plugin) Available added in v2.2.0

func (c *Plugin) Available()

Available interface implementation

func (*Plugin) CollectCheckerImpls added in v2.0.4

func (c *Plugin) CollectCheckerImpls(name endure.Named, r Checker) error

CollectCheckerImpls collects services which can provide Status.

func (*Plugin) CollectReadinessImpls added in v2.0.4

func (c *Plugin) CollectReadinessImpls(name endure.Named, r Readiness) error

CollectReadinessImpls collects services which can provide Readiness check.

func (*Plugin) Collects

func (c *Plugin) Collects() []interface{}

Collects declares services to be collected.

func (*Plugin) Init

func (c *Plugin) Init(log logger.Logger, cfg config.Configurer) error

func (*Plugin) Name

func (c *Plugin) Name() string

Name of the service.

func (*Plugin) RPC

func (c *Plugin) RPC() interface{}

RPC returns associated rpc service.

func (*Plugin) Serve

func (c *Plugin) Serve() chan error

func (*Plugin) Stop

func (c *Plugin) Stop() error

type Plugins

type Plugins struct {
	Plugins []string `query:"plugin"`
}

type Readiness added in v2.0.4

type Readiness interface {
	Ready() Status
}

Readiness interface used to get readiness status from the plugin that means, that worker poll inside the plugin has 1+ plugins which are ready to work at the particular moment

type Status

type Status struct {
	Code int
}

Status consists of status code from the service

Jump to

Keyboard shortcuts

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