Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Guarantees ¶
type Guarantees struct {
MemberFailureTolerance bool `json:"member_failure_tolerance,omitempty"`
HostFailureTolerance bool `json:"host_failure_tolerance,omitempty"`
RollingMaintenance bool `json:"rolling_maintenance,omitempty"`
CredentialRotation bool `json:"credential_rotation,omitempty"`
PKIRotation bool `json:"pki_rotation,omitempty"`
ManagementContinuity bool `json:"management_continuity,omitempty"`
FailureDomain string `json:"failure_domain,omitempty"`
}
type InstanceObservation ¶
type Intent ¶
type Intent struct {
HA bool `json:"ha"`
Overrides map[string]Override `json:"overrides,omitempty"`
}
func (Intent) Components ¶
func (Intent) Resolve ¶
func (i Intent) Resolve(component string) Requirement
type NegotiationResult ¶
type NegotiationResult struct {
Component string `json:"component"`
Provider string `json:"provider"`
RequiredHA bool `json:"required_ha"`
RequestedInstances int `json:"requested_instances,omitempty"`
EffectiveInstances int `json:"effective_instances,omitempty"`
Support SupportLevel `json:"support"`
ExplicitException bool `json:"explicit_exception,omitempty"`
Satisfied bool `json:"satisfied"`
Reason string `json:"reason,omitempty"`
Guarantees Guarantees `json:"guarantees,omitempty"`
}
func Negotiate ¶
func Negotiate(requirement Requirement, provider string, support Support) (NegotiationResult, error)
type Requirement ¶
type ServiceObservation ¶
type ServiceObservation struct {
Component string `json:"component"`
StableEndpoints []string `json:"stable_endpoints,omitempty"`
Instances []InstanceObservation `json:"instances"`
Health Health `json:"health"`
ReadyInstances int `json:"ready_instances"`
}
func Observe ¶
func Observe(requirement Requirement, instances []InstanceObservation, endpoints []string) ServiceObservation
type Support ¶
type Support struct {
Level SupportLevel `json:"level"`
RecommendedInstances int `json:"recommended_instances,omitempty"`
Limits string `json:"limits,omitempty"`
Guarantees Guarantees `json:"guarantees,omitempty"`
}
type SupportLevel ¶
type SupportLevel string
const ( Supported SupportLevel = "SUPPORTED" PartiallySupported SupportLevel = "PARTIALLY_SUPPORTED" Unsupported SupportLevel = "UNSUPPORTED" )
type UnsupportedGuaranteeError ¶
type UnsupportedGuaranteeError struct {
Result NegotiationResult
}
func (*UnsupportedGuaranteeError) Error ¶
func (e *UnsupportedGuaranteeError) Error() string
Click to show internal directories.
Click to hide internal directories.