publisher

package
v0.0.0-...-8fef1cc Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2022 License: Apache-2.0 Imports: 9 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollisionStrategies

func CollisionStrategies() []string

func FindIface

func FindIface(ip net.IP) (iface net.Interface, err error)

func IfaceCheck

func IfaceCheck(ip net.IP, iface net.Interface, ifaceChanged chan struct{})

func Publish

func Publish(ip net.IP, iface net.Interface, service Service, shutdown chan struct{}, waitGroup *sync.WaitGroup) (err error)

func SetLogLevel

func SetLogLevel(level logrus.Level)

Types

type CollisionStrategy

type CollisionStrategy int
const (
	Inaction CollisionStrategy = iota
	HostName
)

func NewCollisionStrategy

func NewCollisionStrategy(strategy string) (CollisionStrategy, error)

func (CollisionStrategy) String

func (strategy CollisionStrategy) String() (string, error)

type Service

type Service struct {
	Name     string `mapstructure:"name"`
	HostName string `mapstructure:"host_name"`
	SvcType  string `mapstructure:"type"`
	Domain   string `mapstructure:"domain"`
	Port     int    `mapstructure:"port"`
	TTL      uint32 `mapstructure:"ttl"`
}

func (*Service) AlterName

func (s *Service) AlterName(strategy CollisionStrategy) error

Jump to

Keyboard shortcuts

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