ufwhandler

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cleanup

func Cleanup(ctx *context.Context, client *client.Client)

func CreateClient added in v0.11.0

func CreateClient() (*context.Context, *client.Client, error)

func CreateUfwRule

func CreateUfwRule(ch <-chan *types.ContainerJSON, c *cache.Cache)

func DeleteUfwRule

func DeleteUfwRule(containerID <-chan string, c *cache.Cache)

func Reconnect added in v0.11.0

func Reconnect() (*context.Context, *client.Client)

func StreamEvents added in v0.11.0

func StreamEvents(ctx *context.Context, c *client.Client) (<-chan events.Message, <-chan error)

func Sync added in v0.9.0

func Sync(ctx *context.Context, createChannel chan *types.ContainerJSON, client *client.Client)

Types

type TrackedContainer

type TrackedContainer struct {
	Name             string
	IPAddress        string
	Labels           map[string]string
	UfwInboundRules  []UfwRule
	UfwOutboundRules []UfwRule
}

type UfwRule

type UfwRule struct {
	CIDR    string
	Port    string
	Proto   string
	Comment string
}

Jump to

Keyboard shortcuts

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