discovery

package
v0.0.0-...-215383d Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Discovery

type Discovery struct {
	Strategy      Strategy
	CacheLocation string
}

func (Discovery) DiscoverHosts

func (d Discovery) DiscoverHosts() ([]Host, error)

func (Discovery) GetHostsFromCache

func (d Discovery) GetHostsFromCache() []Host

type Host

type Host struct {
	Name string
	Ip   string
	Up   bool
}

func (Host) Description

func (h Host) Description() string

func (Host) FilterValue

func (h Host) FilterValue() string

func (Host) Title

func (h Host) Title() string

type ListHostsResponse

type ListHostsResponse struct {
	Hosts  []list.Item
	Source ListHostsResponseSource
	Err    error
}

type ListHostsResponseSource

type ListHostsResponseSource int
const (
	Cache         ListHostsResponseSource = iota
	AutoDiscovery                         = iota
)

type Strategy

type Strategy interface {
	ListHosts(ctx context.Context) ([]Host, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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