state

package
v2.1.0-alpha.4+incompa... Latest Latest
Warning

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

Go to latest
Published: May 3, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxQueueSize determines how many logging events to queue in-memory
	// before start dropping them (probably because logging server is down)
	MaxQueueSize = 10
)

Variables

This section is empty.

Functions

func NoCache

func NoCache(clt auth.ClientI, cacheName []string) (auth.AccessPoint, error)

NoCache is a no cache used for access point

Types

type CachingAuditLog

type CachingAuditLog struct {
	// contains filtered or unexported fields
}

CachingAuditLog implements events.IAuditLog on the recording machine (SSH server) It captures the local recording and forwards it to the AuditLog network server

func MakeCachingAuditLog

func MakeCachingAuditLog(logServer events.IAuditLog) *CachingAuditLog

MakeCachingAuditLog creaets a new & fully initialized instance of the alog

func (*CachingAuditLog) Close

func (ll *CachingAuditLog) Close() error

func (*CachingAuditLog) EmitAuditEvent

func (ll *CachingAuditLog) EmitAuditEvent(eventType string, fields events.EventFields) error

func (*CachingAuditLog) GetSessionChunk

func (ll *CachingAuditLog) GetSessionChunk(string, session.ID, int, int) ([]byte, error)

func (*CachingAuditLog) GetSessionEvents

func (ll *CachingAuditLog) GetSessionEvents(string, session.ID, int) ([]events.EventFields, error)

func (*CachingAuditLog) PostSessionChunk

func (ll *CachingAuditLog) PostSessionChunk(namespace string, sid session.ID, reader io.Reader) error

func (*CachingAuditLog) SearchEvents

func (ll *CachingAuditLog) SearchEvents(time.Time, time.Time, string) ([]events.EventFields, error)

type CachingAuthClient

type CachingAuthClient struct {
	Config
	// contains filtered or unexported fields
}

CachingAuthClient implements auth.AccessPoint interface and remembers the previously returned upstream value for each API call.

This which can be used if the upstream AccessPoint goes offline

func NewCachingAuthClient

func NewCachingAuthClient(config Config) (*CachingAuthClient, error)

NewCachingAuthClient creates a new instance of CachingAuthClient using a live connection to the auth server (ap)

func (*CachingAuthClient) GetCertAuthorities

func (cs *CachingAuthClient) GetCertAuthorities(ct services.CertAuthType, loadKeys bool) (cas []services.CertAuthority, err error)

GetCertAuthorities is a part of auth.AccessPoint implementation

func (*CachingAuthClient) GetDomainName

func (cs *CachingAuthClient) GetDomainName() (clusterName string, err error)

GetDomainName is a part of auth.AccessPoint implementation

func (*CachingAuthClient) GetNamespace

func (cs *CachingAuthClient) GetNamespace(name string) (namespace *services.Namespace, err error)

GetNamespace returns namespace

func (*CachingAuthClient) GetNamespaces

func (cs *CachingAuthClient) GetNamespaces() (namespaces []services.Namespace, err error)

GetNamespaces is a part of auth.AccessPoint implementation

func (*CachingAuthClient) GetNodes

func (cs *CachingAuthClient) GetNodes(namespace string) (nodes []services.Server, err error)

GetNodes is a part of auth.AccessPoint implementation

func (*CachingAuthClient) GetProxies

func (cs *CachingAuthClient) GetProxies() (proxies []services.Server, err error)

GetProxies is a part of auth.AccessPoint implementation

func (*CachingAuthClient) GetReverseTunnels

func (cs *CachingAuthClient) GetReverseTunnels() (tunnels []services.ReverseTunnel, err error)

func (*CachingAuthClient) GetRole

func (cs *CachingAuthClient) GetRole(name string) (role services.Role, err error)

GetRole is a part of auth.AccessPoint implementation

func (*CachingAuthClient) GetRoles

func (cs *CachingAuthClient) GetRoles() (roles []services.Role, err error)

GetRoles is a part of auth.AccessPoint implementation

func (*CachingAuthClient) GetUsers

func (cs *CachingAuthClient) GetUsers() (users []services.User, err error)

GetUsers is a part of auth.AccessPoint implementation

func (*CachingAuthClient) UpsertNode

func (cs *CachingAuthClient) UpsertNode(s services.Server) error

UpsertNode is part of auth.AccessPoint implementation

func (*CachingAuthClient) UpsertProxy

func (cs *CachingAuthClient) UpsertProxy(s services.Server) error

UpsertProxy is part of auth.AccessPoint implementation

type Config

type Config struct {
	// CacheTTL sets maximum TTL the cache keeps the value
	CacheTTL time.Duration
	// NeverExpires if set, never expires cache values
	NeverExpires bool
	// AccessPoint is access point for this
	AccessPoint auth.AccessPoint
	// Backend is cache backend
	Backend backend.Backend
	// Clock can be set to control time
	Clock clockwork.Clock
	// SkipPreload turns off preloading on start
	SkipPreload bool
}

Config is CachingAuthClient config

func (*Config) CheckAndSetDefaults

func (c *Config) CheckAndSetDefaults() error

CheckAndSetDefaults checks parameters and sets default values

type NewCachingAccessPoint

type NewCachingAccessPoint func(clt auth.ClientI, cacheName []string) (auth.AccessPoint, error)

NewCachingAcessPoint returns new caching access point using access point policy

Jump to

Keyboard shortcuts

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