kubernetes

package
v2.0.0-...-be496b8 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package kubernetes defines the kubernetes discovery provider

Index

Constants

View Source
const (
	Namespace          string = "namespace"  // Namespace specifies the kubernetes namespace
	ApplicationName           = "app_name"   // ApplicationName specifies the application name.
	GroupCachePortName        = "group-port" // GroupCachePortName specifies the group cache port name
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Discovery

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

Discovery represents the kubernetes discovery

func NewDiscovery

func NewDiscovery() *Discovery

NewDiscovery returns an instance of the kubernetes discovery provider

func (*Discovery) Close

func (d *Discovery) Close() error

Close closes the provider

func (*Discovery) Deregister

func (d *Discovery) Deregister() error

Deregister removes this node from a service discovery directory.

func (*Discovery) DiscoverNodes

func (d *Discovery) DiscoverNodes() ([]*discovery.Node, error)

DiscoverNodes returns a list of known nodes.

func (*Discovery) ID

func (d *Discovery) ID() string

ID returns the discovery provider id

func (*Discovery) Initialize

func (d *Discovery) Initialize() error

Initialize initializes the plugin: registers some internal data structures, clients etc.

func (*Discovery) Register

func (d *Discovery) Register() error

Register registers this node to a service discovery directory.

func (*Discovery) SetConfig

func (d *Discovery) SetConfig(meta discovery.Options) error

SetConfig registers the underlying discovery configuration

func (*Discovery) Watch

func (d *Discovery) Watch(ctx context.Context) (<-chan discovery.Event, error)

Watch returns event based upon node lifecycle

Jump to

Keyboard shortcuts

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