discovery

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Debug bool
View Source
var DockerSocket string
View Source
var ServiceContainers []ContainerInfo

Functions

func DockerEventListener

func DockerEventListener(socketPath string, eventChan chan<- string)

Types

type ContainerInfo

type ContainerInfo struct {
	ID               string
	Name             string
	IP               string
	DisconterService struct {
		Name     string
		Priority uint16
		Weight   uint16
		Port     uint16
	}
}

func ListContainers

func ListContainers(socket string) (containers []ContainerInfo, err error)

type DockerEvent

type DockerEvent struct {
	Type   string `json:"Type"`
	Action string `json:"Action"`
	Actor  struct {
		Attributes struct {
			Name             string `json:"name"`
			DisconterService string `json:"disconter.service"`
		} `json:"Attributes"`
	} `json:"Actor"`
}

Jump to

Keyboard shortcuts

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