hosts

package
v4.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package hosts defines the host resolution contracts for distributed queries

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hosts

type Hosts []ID

Hosts is a slice of ID values, used for returning multiple Host IDs via a resolver

type ID

type ID = string

ID identifies a remote goProbe instance to query (host, FQDN, UUID, etc.). If you already have an ID type elsewhere, feel free to replace this.

type Resolver

type Resolver interface {
	Resolve(ctx context.Context, query string) (Hosts, error)
}

Resolver returns the set of IDs that the distributed querier should contact

type ResolverMap added in v4.1.19

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

ResolverMap is a concurrency-safe map of named resolvers

func NewResolverMap added in v4.1.19

func NewResolverMap() *ResolverMap

NewResolverMap creates a new ResolverMap

func (*ResolverMap) Delete added in v4.1.19

func (rm *ResolverMap) Delete(name string)

Delete deletes an entry from the map

func (*ResolverMap) Get added in v4.1.19

func (rm *ResolverMap) Get(name string) (Resolver, bool)

Get returns the resolver for a given name in case it exists

func (*ResolverMap) Set added in v4.1.19

func (rm *ResolverMap) Set(name string, resolver Resolver)

Set sets the resolver for a given name

Jump to

Keyboard shortcuts

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