status

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package status implements status reporting.

Index

Constants

View Source
const Name = "status"

Name identifies the plugin on manager.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Service       string `json:"service"`
	PartitionName string `json:"partition_name,omitempty"`
}

Config contains configuration for the plugin.

func ParseConfig added in v0.10.2

func ParseConfig(config []byte, services []string) (*Config, error)

ParseConfig validates the config and injects default values.

type Plugin

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

Plugin implements status reporting. Updates can be triggered by the caller.

func Lookup added in v0.10.2

func Lookup(manager *plugins.Manager) *Plugin

Lookup returns the status plugin registered with the manager.

func New

func New(parsedConfig *Config, manager *plugins.Manager) *Plugin

New returns a new Plugin with the given config.

func (*Plugin) Reconfigure added in v0.10.2

func (p *Plugin) Reconfigure(_ context.Context, config interface{})

Reconfigure notifies the plugin with a new configuration.

func (*Plugin) Start

func (p *Plugin) Start(ctx context.Context) error

Start starts the plugin.

func (*Plugin) Stop

func (p *Plugin) Stop(ctx context.Context)

Stop stops the plugin.

func (*Plugin) UpdateBundleStatus added in v0.10.2

func (p *Plugin) UpdateBundleStatus(status bundle.Status)

UpdateBundleStatus notifies the plugin that the policy bundle was updated.

func (*Plugin) UpdateDiscoveryStatus added in v0.10.2

func (p *Plugin) UpdateDiscoveryStatus(status bundle.Status)

UpdateDiscoveryStatus notifies the plugin that the discovery bundle was updated.

type UpdateRequestV1

type UpdateRequestV1 struct {
	Labels    map[string]string `json:"labels"`
	Bundle    *bundle.Status    `json:"bundle,omitempty"`
	Discovery *bundle.Status    `json:"discovery,omitempty"`
}

UpdateRequestV1 represents the status update message that OPA sends to remote HTTP endpoints.

Jump to

Keyboard shortcuts

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