Documentation
¶
Index ¶
- Constants
- Variables
- func AddIgnoreListFlags(cmd *cobra.Command)
- func AddOperatorFlags(cmd *cobra.Command)
- func AddProviderFlag(cmd *cobra.Command)
- func DetectPort(ctx context.Context, flags *flag.FlagSet, flag string, ...) (int, error)
- func OpenLogger() log.Logger
- type IgnoreList
- type IgnoreListConfig
- type IgnoreListReadOnly
- type OperatorConfig
- type OperatorHTTP
- type PrepareFlagFn
- type PrepareFn
- type PreparedResult
Constants ¶
View Source
const ( FlagIgnoreListEntryLimit = "ignore-list-entry-limit" FlagIgnoreListAgeLimit = "ignore-list-age-limit" FlagEventFailureLimit = "event-failure-limit" )
View Source
const ( FlagRESTPort = "rest-port" FlagRESTAddress = "rest-address" FlagGRPCPort = "grpc-port" FlagPod = "pod-name" FlagNamespace = "pod-namespace" )
Variables ¶
View Source
var (
ErrObservationStopped = errors.New("observation stopped")
)
Functions ¶
func AddIgnoreListFlags ¶
func AddOperatorFlags ¶
func AddProviderFlag ¶
func DetectPort ¶
func OpenLogger ¶
Types ¶
type IgnoreList ¶
type IgnoreList interface {
IgnoreListReadOnly
Prepare(pd PreparedResult) error
AddError(id mtypes.LeaseID, err error, extra ...string)
Prune() bool
}
func NewIgnoreList ¶
func NewIgnoreList(config IgnoreListConfig) IgnoreList
type IgnoreListConfig ¶
type IgnoreListConfig struct {
// This is a config object, so it isn't exported as an interface
FailureLimit uint
EntryLimit uint
AgeLimit time.Duration
}
func IgnoreListConfigFromViper ¶
func IgnoreListConfigFromViper() IgnoreListConfig
type IgnoreListReadOnly ¶
type OperatorConfig ¶
type OperatorConfig struct {
PruneInterval time.Duration
WebRefreshInterval time.Duration
RetryDelay time.Duration
ProviderAddress string
}
func GetOperatorConfigFromViper ¶
func GetOperatorConfigFromViper() OperatorConfig
type OperatorHTTP ¶
type OperatorHTTP interface {
AddPreparedEndpoint(path string, prepare PrepareFn) PrepareFlagFn
GetRouter() *mux.Router
PrepareAll() error
}
func NewOperatorHTTP ¶
func NewOperatorHTTP() (OperatorHTTP, error)
type PrepareFlagFn ¶
type PrepareFlagFn func()
type PrepareFn ¶
type PrepareFn func(pd PreparedResult) error
type PreparedResult ¶
type PreparedResult interface {
Flag()
Set([]byte)
}
Click to show internal directories.
Click to hide internal directories.