mdns_gateway

package
v0.0.0-...-4685c53 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

mdns-gateway package is an API for discovered network services

Index

Constants

View Source
const (
	DefaultName    = mdns.DefaultName + "-gateway"
	DefaultTimeout = 5 * time.Second
)

Variables

This section is empty.

Functions

func NewWithConfig

func NewWithConfig(c Config) (NetServiceGateway, error)

Types

type Config

type Config struct {
	L         string         `hcl:"label,label" json:"label,omitempty"`            // Label
	D         string         `hcl:"domain,optional" json:"domain,omitempty"`       // Domain (defaults to local)
	Interface string         `hcl:"interface,optional" json:"interface,omitempty"` // Interface name
	T         types.Duration `hcl:"ttl,optional" json:"ttl,omitempty"`             // TTL
	Task      types.Task     `hcl:"discovery,optional" json:"discovery,omitempty"` // NetServicesTask (optional)
}

func (Config) Domain

func (c Config) Domain() string

func (Config) Label

func (c Config) Label() string

func (Config) Name

func (c Config) Name() string

func (Config) New

func (c Config) New(ctx context.Context, provider Provider) (Task, error)

Return a new task. Label for the task can be retrieved from context

func (Config) TTL

func (c Config) TTL() time.Duration

Jump to

Keyboard shortcuts

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