pmb

package
v0.0.0-...-7833ee7 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearCredHelperKey

func ClearCredHelperKey() error

ClearCredHelperKey tries to clear the key using the docker-credential-* set of utilities, as discovered by crocker (https://github.com/justone/crocker).

func GenerateRandomID

func GenerateRandomID(prefix string) string

func GenerateRandomString

func GenerateRandomString(length int) string

func GetCredHelperKey

func GetCredHelperKey() (string, error)

GetCredHelperKey tries to retrieve the key from the docker-credential-* set of utilities, as discovered by crocker (https://github.com/justone/crocker).

func SendNotification

func SendNotification(conn *Connection, note Notification) error

func StoreCredHelperKey

func StoreCredHelperKey(keys string) error

StoreCredHelperKey tries to store the key using the docker-credential-* set of utilities, as discovered by crocker (https://github.com/justone/crocker).

Types

type ConfigClient

type ConfigClient interface {
	GetAll() (map[string]string, error)
	Unset(system bool, key string) error
	Set(system bool, key, value string) error
	Get(key string) (string, error)
}

type ConfigGetter

type ConfigGetter interface {
	Get(key string) (string, error)
}

type Connection

type Connection struct {
	Out chan Message
	In  chan Message

	Keys []string
	Id   string
	// contains filtered or unexported fields
}

type Message

type Message struct {
	Contents map[string]interface{}
	Raw      string
	Done     chan error
	Internal bool
}

type Notification

type Notification struct {
	Message string
	URL     string
	Level   float64
}

type PMB

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

func GetPMB

func GetPMB(brokerURI string) *PMB

func (*PMB) BrokerURI

func (pmb *PMB) BrokerURI() string

func (*PMB) ConnectClient

func (pmb *PMB) ConnectClient(id string, checkKey bool) (*Connection, error)

func (*PMB) ConnectIntroducer

func (pmb *PMB) ConnectIntroducer(id string) (*Connection, error)

func (*PMB) ConnectSubClient

func (pmb *PMB) ConnectSubClient(conn *Connection, sub string) (*Connection, error)

func (*PMB) CopyKey

func (pmb *PMB) CopyKey(id string) (*Connection, error)

func (*PMB) GetConfigKey

func (pmb *PMB) GetConfigKey() string

func (*PMB) GetConnection

func (pmb *PMB) GetConnection(id string, isIntroducer bool) (*Connection, error)

Deprecated

type PMBConfig

type PMBConfig map[string]string

type RealConfigClient

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

func NewDefaultConfigClient

func NewDefaultConfigClient() (*RealConfigClient, error)

func (*RealConfigClient) Get

func (rcc *RealConfigClient) Get(key string) (string, error)

func (*RealConfigClient) GetAll

func (rcc *RealConfigClient) GetAll() (map[string]string, error)

func (*RealConfigClient) Set

func (rcc *RealConfigClient) Set(system bool, key, value string) error

func (*RealConfigClient) Unset

func (rcc *RealConfigClient) Unset(system bool, key string) error

Jump to

Keyboard shortcuts

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