kubernetes

package
v0.0.0-...-0f49ba3 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LIST_INTERVAL    = 10 * time.Minute
	REFRESH_INTERVAL = 60 * time.Minute
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DummyWatcher

type DummyWatcher struct{}

func (*DummyWatcher) Entries

func (w *DummyWatcher) Entries() []runtime.Object

func (*DummyWatcher) Error

func (w *DummyWatcher) Error() string

func (*DummyWatcher) Type

func (w *DummyWatcher) Type() string

func (*DummyWatcher) Version

func (w *DummyWatcher) Version() uint64

type InterfaceInfo

type InterfaceInfo struct {
	TapIndex int
	MAC      uint64
	// 按IP升序, passive模式下只填写IP, 不写Mask
	IPs      []*net.IPNet
	Name     string
	DeviceID string
}

func (*InterfaceInfo) Equal

func (n *InterfaceInfo) Equal(other *InterfaceInfo) bool

func (*InterfaceInfo) Less

func (n *InterfaceInfo) Less(other *InterfaceInfo) bool

func (*InterfaceInfo) String

func (n *InterfaceInfo) String() string

type Poller

type Poller interface {
	Start() error
	Stop() error
	GetVersion() uint64
	GetInterfaceInfo() []InterfaceInfo
}

type PollerType

type PollerType uint8
const (
	POLLER_ADAPTIVE PollerType = iota
	POLLER_ACTIVE
	POLLER_PASSIVE
)

type Watcher

type Watcher interface {
	Type() string
	Version() uint64
	Error() string
	Entries() []runtime.Object
}

type WatcherClient

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

func NewKubernetesWatchClient

func NewKubernetesWatchClient(client *kubernetes.Clientset) *WatcherClient

type WatcherStarter

type WatcherStarter func(context.Context, *WatcherClient, string) (Watcher, error)

Jump to

Keyboard shortcuts

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