config

package
v0.0.0-...-df3db6e Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2015 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterConfig

type ClusterConfig struct {
	Key          string `json:"key"`
	Name         string `json:"name"`
	SelfRegister bool   `json:"selfregister"`
}

func GenerateCluster

func GenerateCluster(name string, selfreg bool) (*ClusterConfig, error)

type Configer

type Configer interface {
	Cluster() (*ClusterConfig, error)
	UpdateCluster(ClusterConfig) (*ClusterConfig, error)
	ClusterConfig() (NewClusterConfig, Stop, error)
	Zones() ([]string, error)
	CreateZone(zone string) error
	DropZone(zone string) error
	PutGateway(zone string, gw Gateway) error
	GetGateway(zone string) (*Gateway, error)
	Gateway(zone string) (NewGateway, Stop, error)
}

func New

func New(cl *etcd.Cluster) (Configer, error)

type Gateway

type Gateway struct {
	DefaultHost     string   `json:"defaulthost"`
	Force2FA        bool     `json:"force2fa"`
	HostKey         string   `json:"hostkey"`
	LogLevel        string   `json:"loglevel"`
	CheckAllow      bool     `json:"checkAllow"`
	MaxAutologin2FA int      `json:"maxautologin2fa"`
	AllowedCidrs    []string `json:"allowedcidrs"`
	DeniedCidrs     []string `json:"deniedcidrs"`
	AllowDeny       bool     `json:"allowdeny"`
}

func GenerateGateway

func GenerateGateway() (*Gateway, error)

func InitZone

func InitZone(cfger Configer, zone string, createGateway bool) (*Gateway, error)

type NewClusterConfig

type NewClusterConfig <-chan ClusterConfig

type NewGateway

type NewGateway <-chan Gateway

type Stop

type Stop chan bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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