Documentation ¶
Index ¶
Constants ¶
View Source
const (
LRUTimeout = 30 * time.Minute
)
View Source
const (
PullingErrorKey = "__pulling_error__"
)
Variables ¶
View Source
var IncorrectPasswordErr = fmt.Errorf("incorrect password")
View Source
var InvalidUpstreamErr = fmt.Errorf("invalid upstream")
View Source
var (
Version = "debug"
)
Functions ¶
func Map2Upstream ¶ added in v0.1.4
func Map2Upstream(m UpstreamConf, upstream interface{}) error
Types ¶
type AccessKey ¶
type Config ¶
func BuildConfig ¶ added in v0.1.3
func (*Config) CheckDiverseCombinations ¶
func (*Config) CheckMethodSupported ¶
type Group ¶
type Group struct { Name string `json:"name"` Port int `json:"port"` Servers []Server `json:"servers"` Upstreams []UpstreamConf `json:"upstreams"` UserContextPool *UserContextPool `json:"-"` }
func (*Group) BuildMasterKeys ¶
func (g *Group) BuildMasterKeys()
func (*Group) BuildUserContextPool ¶
type Outline ¶
type Outline struct { Name string `json:"name"` Type string `json:"type"` Server string `json:"server"` Link string `json:"link"` SSHPort string `json:"sshPort"` SSHUsername string `json:"sshUsername"` SSHPrivateKey string `json:"sshPrivateKey"` SSHPassword string `json:"sshPassword"` ApiUrl string `json:"apiUrl"` ApiCertSha256 string `json:"apiCertSha256"` }
func (Outline) GetServers ¶
type ShadowboxConfig ¶
type ShadowboxConfig struct {
AccessKeys []AccessKey `json:"accessKeys"`
}
func (*ShadowboxConfig) ToServers ¶
func (c *ShadowboxConfig) ToServers(name, host string) []Server
type UpstreamConf ¶ added in v0.1.4
type UpstreamConf map[string]interface{}
func (UpstreamConf) Equal ¶ added in v0.1.4
func (uc UpstreamConf) Equal(that UpstreamConf) bool
func (UpstreamConf) GetPullingError ¶ added in v0.1.7
func (uc UpstreamConf) GetPullingError() error
func (UpstreamConf) SetPullingError ¶ added in v0.1.7
func (uc UpstreamConf) SetPullingError(err error)
type UserContext ¶
encapsulating semantic types
func NewUserContext ¶
func NewUserContext(servers []Server) *UserContext
func (*UserContext) Close ¶
func (ctx *UserContext) Close() error
func (*UserContext) Infra ¶
func (ctx *UserContext) Infra() *lrulist.LruList
type UserContextPool ¶
func (*UserContextPool) GetOrInsert ¶ added in v0.1.2
func (pool *UserContextPool) GetOrInsert(addr net.Addr, servers []Server) *UserContext
func (*UserContextPool) Infra ¶
func (pool *UserContextPool) Infra() *lru.LRU
Click to show internal directories.
Click to hide internal directories.