Documentation
¶
Index ¶
- Constants
- Variables
- func CreateBridgeNetwork(name string) error
- func CreateCustomKafka(podName, networkInspectFormat, network string, kafkaPort int, ...) (string, error)
- func CreateCustomMysql(podName, networkInspectFormat, network, password, database string, port int, ...) (string, error)
- func CreateCustomPostgres(podName, networkInspectFormat, network, user, password, database string, ...) (string, error)
- func CreateCustomScylla(podName, networkInspectFormat, network, extraCommands string, ...) (string, error)
- func CreateCustomZookeeper(podName, networkInspectFormat, network string, port int, ...) (string, error)
- func CreateKafka(podName string, kafkaPort int, zookeeperHost string, zookeeperPort int) (string, error)
- func CreateKafkaInNetwork(podName, network string, kafkaPort int, zookeeperHost string, ...) (string, error)
- func CreateMysql(podName, password, database string, port int) (string, error)
- func CreateMysqlInNetwork(podName, network, password, database string, port int) (string, error)
- func CreatePostgres(podName, user, password, database string, port int) (string, error)
- func CreatePostgresInNetwork(podName, network, user, password, database string, port int) (string, error)
- func CreateScylla(podName, extraCommands string) (string, error)
- func CreateScyllaInNetwork(podName, network, extraCommands string) (string, error)
- func CreateZookeeper(podName string, port int) (string, error)
- func CreateZookeeperInNetwork(podName, network string, port int) (string, error)
- func Exists(pod string, status PodStatus) (bool, error)
- func Remove(pod string) error
- func RemoveBridgeNetwork(name string) error
- func Run(name, image, network, extra string) error
- func WaitUntilListeningAndGetPodIP(podName, networkInspectFormat, network string, port int, ...) (string, error)
- type Address
- type PodStatus
Constants ¶
const ( // Restarting - pod status Restarting PodStatus = "restarting" // Running - pod status Running PodStatus = "running" // Removing - pod status Removing PodStatus = "removing" // Paused - pod status Paused PodStatus = "paused" // Exited - pod status Exited PodStatus = "exited" // Dead - pod status Dead PodStatus = "dead" // DefaultnetworkInspectFormat - the default inspect format DefaultnetworkInspectFormat string = `(index .NetworkSettings.Networks "%s").IPAddress` )
Variables ¶
var ( // ErrPodHashNotFound - raised when the output is incompatible with the hash pattern ErrPodHashNotFound error = errors.New("pod hash pattern was not found") // ErrNetworkHashNotFound - raised when the output is incompatible with the hash pattern ErrNetworkHashNotFound error = errors.New("network hash pattern was not found") // ErrPodIPNotFound - raised when the inspect format output didn't returned any ip ErrPodIPNotFound error = errors.New("pod ip not found") // ErrPodNotListening - raised when the pod is not listening ErrPodNotListening error = errors.New("pod is not listening") )
Functions ¶
func CreateBridgeNetwork ¶ added in v1.0.1
CreateBridgeNetwork - creates a bridge network
func CreateCustomKafka ¶ added in v1.0.1
func CreateCustomKafka(podName, networkInspectFormat, network string, kafkaPort int, zookeeperHost string, zookeeperPort int, noConnTimeout, afterConnTimeout time.Duration) (string, error)
CreateCustomKafka - starts the kafka pod using custom configurations
func CreateCustomMysql ¶ added in v1.0.1
func CreateCustomMysql(podName, networkInspectFormat, network, password, database string, port int, moConnTimeout, afterConnTimeout time.Duration) (string, error)
CreateCustomMysql - starts the mysql pod
func CreateCustomPostgres ¶ added in v1.0.1
func CreateCustomPostgres(podName, networkInspectFormat, network, user, password, database string, port int, noConnTimeout, afterConnTimeout time.Duration) (string, error)
CreateCustomPostgres - starts the postgres pod
func CreateCustomScylla ¶ added in v1.0.1
func CreateCustomScylla(podName, networkInspectFormat, network, extraCommands string, noConnTimeout, afterConnTimeout time.Duration) (string, error)
CreateCustomScylla - starts the scylla pod
func CreateCustomZookeeper ¶ added in v1.0.1
func CreateCustomZookeeper(podName, networkInspectFormat, network string, port int, noConnTimeout, afterConnTimeout time.Duration) (string, error)
CreateCustomZookeeper - creates a zookeeper pod
func CreateKafka ¶ added in v1.0.1
func CreateKafka(podName string, kafkaPort int, zookeeperHost string, zookeeperPort int) (string, error)
CreateKafka - starts the kafka pod using default configurations
func CreateKafkaInNetwork ¶ added in v1.0.1
func CreateKafkaInNetwork(podName, network string, kafkaPort int, zookeeperHost string, zookeeperPort int) (string, error)
CreateKafkaInNetwork - starts the kafka pod using default configurations
func CreateMysql ¶ added in v1.0.1
CreateMysql - starts the mysql pod using custom configurations
func CreateMysqlInNetwork ¶ added in v1.0.1
CreateMysqlInNetwork - starts the mysql pod using custom configurations
func CreatePostgres ¶ added in v1.0.1
CreatePostgres - starts the postgres pod using custom configurations
func CreatePostgresInNetwork ¶ added in v1.0.1
func CreatePostgresInNetwork(podName, network, user, password, database string, port int) (string, error)
CreatePostgresInNetwork - starts the postgres pod using custom configurations
func CreateScylla ¶ added in v1.0.1
CreateScylla - starts the scylla pod using custom parameters
func CreateScyllaInNetwork ¶ added in v1.0.1
CreateScyllaInNetwork - starts the scylla pod using custom parameters
func CreateZookeeper ¶ added in v1.0.1
CreateZookeeper - creates a zookeeper pod
func CreateZookeeperInNetwork ¶ added in v1.0.1
CreateZookeeperInNetwork - starts the kafka pod using default configurations
func RemoveBridgeNetwork ¶ added in v1.0.1
RemoveBridgeNetwork - removes a bridge network
func WaitUntilListeningAndGetPodIP ¶ added in v1.0.1
func WaitUntilListeningAndGetPodIP( podName, networkInspectFormat, network string, port int, noConnTimeout, afterConnTimeout time.Duration, ) (string, error)
WaitUntilListeningAndGetPodIP - wait for the pod to be listening in the specied port and returns the pod's ip
Types ¶
type Address ¶ added in v1.0.1
Address - some pod address
func NewAddress ¶ added in v1.0.1
NewAddress - creates a new address
func WaitUntilListening ¶
func WaitUntilListening(noConnTimeout, afterConnTimeout time.Duration, addresses ...Address) []Address
WaitUntilListening - wait some pod(s) to be listening