nsmplugin

package
v0.0.0-...-d5eb696 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PluginName defines name of the NSM Plugin.
	// Config file name is `PluginName + ".conf"`
	PluginName = "nsm-plugin"
)

Variables

View Source
var DefaultPlugin = *NewPlugin(WithNotifications())

DefaultPlugin is a default instance of NSMPlugin. Notifications enabled by default for the sake of CNF Provisioner.

Functions

func ServiceLabelForNSMNotifs

func ServiceLabelForNSMNotifs(groupName string) servicelabel.Option

Types

type Deps

type Deps struct {
	infra.PluginDeps
	KVScheduler    kvs.KVScheduler
	NotifPublisher descriptor.NotificationPublisher // optional
}

type NSMPlugin

type NSMPlugin struct {
	Deps
	// contains filtered or unexported fields
}

NSMPlugin allows integration with Network Service Mesh.

func NewPlugin

func NewPlugin(opts ...Option) *NSMPlugin

NewPlugin creates a new Plugin with the provides Options

func (*NSMPlugin) Close

func (p *NSMPlugin) Close() error

Close is NOOP.

func (*NSMPlugin) Init

func (p *NSMPlugin) Init() error

Init initializes NSM descriptors.

type Option

type Option func(*NSMPlugin)

Option is a function that can be used in NewPlugin to customize Plugin.

func WithCustomizedNotifications

func WithCustomizedNotifications(kvdb keyval.KvProtoPlugin, groupName string) Option

WithNotifications enables notifications with customized parameters.

func WithNotifications

func WithNotifications() Option

WithNotifications enables notifications with default parameters (etcd DB, global group).

Directories

Path Synopsis
* Copyright (c) 2020 PANTHEON.tech s.r.o.
* Copyright (c) 2020 PANTHEON.tech s.r.o.

Jump to

Keyboard shortcuts

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