Documentation ¶
Index ¶
Constants ¶
View Source
const ( // EventAdd add event EventAdd = "add" // EventUpdate update event EventUpdate = "update" // EventDelete delete event EventDelete = "delete" // EventClose close event EventClose = "close" // EventError err event EventError = "error" )
Variables ¶
View Source
var ( // ErrObjectNotFound error for object not found ErrObjectNotFound = errors.New("object not found") // ErrObjectExists error for object exists ErrObjectExists = errors.New("object already exists") )
Functions ¶
This section is empty.
Types ¶
type CreateOptions ¶
CreateOptions options for create operation
type DeleteOptions ¶
type DeleteOptions struct { // IgnoreNotFound if return err when data not found IgnoreNotFound bool Env string }
DeleteOptions options for delete operation
type ListOptions ¶
type ListOptions struct { Selector *types.ValueSelector Cluster string Namespace string Offset int64 Limit int64 Env string }
ListOptions options for list operation
type Store ¶
type Store interface { Get(ctx context.Context, t types.ObjectType, key types.ObjectKey, opt *GetOptions) (*types.RawObject, error) Create(ctx context.Context, obj *types.RawObject, opt *CreateOptions) error Update(ctx context.Context, obj *types.RawObject, opt *UpdateOptions) error Delete(ctx context.Context, obj *types.RawObject, opt *DeleteOptions) error List(ctx context.Context, objectType types.ObjectType, opts *ListOptions) ([]*types.RawObject, error) Watch(ctx context.Context, resourceType types.ObjectType, opts *WatchOptions) (chan *Event, error) }
Store interface for store object
type UpdateOptions ¶
type UpdateOptions struct { // CreateNotExists if do creation when not exists CreateNotExists bool Env string }
UpdateOptions options for update operation
type WatchOptions ¶
type WatchOptions struct { Selector *types.ValueSelector BatchSize int32 MaxAwaitTime time.Duration StartTime *WatchStartTimeStamp Env string }
WatchOptions options for watch operation
type WatchStartTimeStamp ¶
WatchStartTimeStamp start time stamp for watch
Click to show internal directories.
Click to hide internal directories.