common

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StorePrefix = "stolon/cluster"

	SentinelLeaderKey = "sentinel-leader"
)
View Source
const PgUnixSocketDirectories = "/tmp"

Variables

This section is empty.

Functions

func IsStolonName added in v0.5.0

func IsStolonName(name string) bool

func NameFromStolonName added in v0.5.0

func NameFromStolonName(stolonName string) string

func NewTLSConfig added in v0.5.0

func NewTLSConfig(certFile, keyFile, caFile string, insecureSkipVerify bool) (*tls.Config, error)

func StolonName added in v0.5.0

func StolonName(name string) string

func UID added in v0.5.0

func UID() string

func UUID added in v0.5.0

func UUID() string

func WriteFileAtomic added in v0.6.0

func WriteFileAtomic(filename string, data []byte, perm os.FileMode) error

WriteFileAtomic atoically writes a file, it achieves this by creating a temporary file and then moving it. This function is taken from

https://github.com/youtube/vitess/blob/master/go/ioutil2/ioutil.go

Copyright 2012, Google Inc. BSD-license, see licenses/LICENSE-BSD-3-Clause

Types

type Parameters added in v0.5.0

type Parameters map[string]string

func (Parameters) Equals added in v0.5.0

func (s Parameters) Equals(is Parameters) bool

type Role

type Role string
const (
	RoleUndefined Role = "undefined"
	RoleMaster    Role = "master"
	RoleStandby   Role = "standby"
)

Jump to

Keyboard shortcuts

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