Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Appendable ¶
type Appendable interface {
// Appender returns a new appender for the storage.
Appender() Appender
}
type Appender ¶
type Appender interface {
// AppendResource adds a new copy for the given resource.
AppendResource(urn string, t int64, content ResourceContent) error
// AppendState adds a new value of the state for the given resource.
AppendState(urn string, state string, t int64, value uint64) error
// AppendRelation adds a new connection of the given resources.
AppendRelation(name, srcRrn, targetUrn string, t int64, rs RelationSwitch) error
// Commit submits the collected resources and purges the batch. If Commit
// returns a non-nil error, it also rolls back all modifications made in
// the appender so far, as Rollback would do. In any case, an Appender
// must not be used anymore after Commit has been called.
Commit() error
// Rollback rolls back all modifications made in the appender so far.
// Appender has to be discarded after rollback.
Rollback() error
}
Appender provides batched appends against a storage. It must be completed with a call to Commit or Rollback and must not be reused afterwards. Operations on the Appender interface are not goroutine-safe.
type Attribute ¶
type Attribute interface {
// Name return the attribute name.
Name() string
// Records returns the complete set of resource attributes. Including the identifying of resource.
Records() historical.RecordStrings
}
type AttributeSet ¶
type AttributeSet interface {
Next() bool
At() Attribute
// Err The error that iteration as failed with. When an error occurs, set cannot continue to iterate.
Err() error
// Warnings A collection of warnings for the whole set, could be return even iteration has not failed with error.
Warnings() Warnings
}
type Querier ¶
type Querier interface {
// SelectResources return a set of Resources that matches the given ResourceSelector.
// Caller can specify if it requires return resources to be sorted.
SelectResources(sortResources bool, selectors ...model.ResourceSelector) ResourceRelationSet
// SelectStates returns a set of resource state that matcher the given ResourceSelector.
// Caller can specify if requires return states to be sorted
SelectStates(sortStates bool, selectors ...model.StateSelector) StateSet
// contains filtered or unexported methods
}
type Relation ¶
type Relation interface {
Name() string
Source() string
Target() string
Records() historical.TimePairs
}
type RelationSet ¶
type RelationSwitch ¶
type RelationSwitch int
const ( RelationOn RelationSwitch = iota << 1 RelationOff )
type ResourceContent ¶
type ResourceRelationSet ¶
type ResourceRelationSet interface {
ResourceSet() ResourceSet
RelationSet() RelationSet
}
type ResourceSet ¶
type ResourceSet interface {
Next() bool
At() Resource
// Err The error that iteration as failed with. When an error occurs, set cannot continue to iterate.
Err() error
// Warnings A collection of warnings for the whole set, could be return even iteration has not failed with error.
Warnings() Warnings
}
type State ¶
type State interface {
Resource() string
States() labels.Labels
Name() string
Records() historical.RecordNumber
}
Click to show internal directories.
Click to hide internal directories.