Documentation
¶
Index ¶
- Constants
- type AccountAction
- type Agent
- func (a *Agent) CanAccessShare(shrId int, trx *sqlx.Tx) (bool, error)
- func (a *Agent) CanCreateEnvironment(acctId int, trx *sqlx.Tx) (bool, error)
- func (a *Agent) CanCreateShare(acctId, envId int, reserved, uniqueName bool, _ sdk.ShareMode, ...) (bool, error)
- func (a *Agent) CanReserveName(acctId int, trx *sqlx.Tx) (bool, error)
- func (a *Agent) DroppedEvents() uint64
- func (a *Agent) Handle(u *metrics.Usage) error
- func (a *Agent) HandleContext(ctx context.Context, u *metrics.Usage) error
- func (a *Agent) Start()
- func (a *Agent) Stop()
- type Bandwidth
- type BandwidthPerPeriod
- type Config
- type FailedShare
- type MissingDialPolicy
- type RepairReport
Constants ¶
const DefaultQueryTimeout = 30 * time.Second
DefaultQueryTimeout bounds each of the limits agent's influx queries.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountAction ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
func (*Agent) CanAccessShare ¶
func (*Agent) CanCreateEnvironment ¶
func (*Agent) CanCreateShare ¶
func (*Agent) CanReserveName ¶
func (*Agent) DroppedEvents ¶ added in v2.0.5
func (*Agent) HandleContext ¶ added in v2.0.5
type BandwidthPerPeriod ¶
func DefaultBandwidthPerPeriod ¶
func DefaultBandwidthPerPeriod() *BandwidthPerPeriod
type Config ¶
type Config struct {
Environments int
UniqueNames int
Bandwidth *BandwidthPerPeriod
Cycle time.Duration
Enforcing bool
HandoffTimeout time.Duration
QueryTimeout time.Duration
}
func DefaultConfig ¶
func DefaultConfig() *Config
type FailedShare ¶ added in v2.0.7
type FailedShare struct {
}
FailedShare is a v1-created share whose frontend selection names no live frontend.
type MissingDialPolicy ¶ added in v2.0.7
type MissingDialPolicy struct {
Account string
Name string
// contains filtered or unexported fields
}
MissingDialPolicy is a desired dial policy that was not found by name.
type RepairReport ¶ added in v2.0.7
type RepairReport struct {
Apply bool
Checked int
Missing []*MissingDialPolicy
Created int
Failed int
SkippedAccounts []string
}
RepairReport is the outcome of a RepairDialPolicies run. Checked and Missing count dial policies; Failed counts failed policies and the FailedShares whose desired policies could not be derived.
func RepairDialPolicies ¶ added in v2.0.7
func RepairDialPolicies(str *store.Store, ziti *automation.ZitiAutomation, apply bool, out io.Writer) (*RepairReport, error)
RepairDialPolicies finds the live shares whose dial policies are missing although their account is not limited, and with apply creates them. it honours the bandwidth limit journal: an account limited as a whole is skipped, and so are the shares of a backend mode limited by a scoped limit class; restoring those would lift a limit the journal still records. it never deletes anything.