Example #1
0
	"syscall"
	"time"

	"github.com/sorintlab/stolon/common"

	_ "github.com/lib/pq"
	"github.com/uber-go/zap"
	"golang.org/x/net/context"
)

const (
	postgresConf    = "postgresql.conf"
	tmpPostgresConf = "stolon-temp-postgresql.conf"
)

var log = zap.New(zap.NullEncoder())

func SetLogger(l zap.Logger) {
	log = l
}

type Manager struct {
	pgBinPath       string
	dataDir         string
	parameters      common.Parameters
	localConnParams ConnParams
	replConnParams  ConnParams
	suUsername      string
	suPassword      string
	replUsername    string
	replPassword    string
Example #2
0
	"path/filepath"
	"time"

	"github.com/sorintlab/stolon/common"
	"github.com/sorintlab/stolon/pkg/cluster"
	"github.com/sorintlab/stolon/pkg/flagutil"
	"github.com/sorintlab/stolon/pkg/store"

	"github.com/davecgh/go-spew/spew"
	"github.com/sorintlab/pollon"
	"github.com/spf13/cobra"
	"github.com/uber-go/zap"
	"github.com/uber-go/zap/zwrap"
)

var log = zap.New(zap.NewTextEncoder(), zap.AddCaller())

var cmdProxy = &cobra.Command{
	Use: "stolon-proxy",
	Run: proxy,
}

type config struct {
	storeBackend       string
	storeEndpoints     string
	storeCertFile      string
	storeKeyFile       string
	storeCAFile        string
	storeSkipTlsVerify bool
	clusterName        string
	listenAddress      string