Documentation ¶
Index ¶
- type AdmissionControlPolicy
- type ErrCode
- type ErrRetry
- type Generic
- func (d *Generic) After(ctx context.Context, rev, limit int64) (*sql.Rows, error)
- func (d *Generic) AfterPrefix(ctx context.Context, prefix string, rev, limit int64) (*sql.Rows, error)
- func (d *Generic) Count(ctx context.Context, prefix, startKey string, revision int64) (int64, int64, error)
- func (d *Generic) CountCurrent(ctx context.Context, prefix string, startKey string) (int64, int64, error)
- func (d *Generic) CurrentRevision(ctx context.Context) (int64, error)
- func (d *Generic) DeleteRevision(ctx context.Context, revision int64) error
- func (d *Generic) Fill(ctx context.Context, revision int64) error
- func (d *Generic) GetCompactInterval() time.Duration
- func (d *Generic) GetCompactRevision(ctx context.Context) (int64, int64, error)
- func (d *Generic) GetPollInterval() time.Duration
- func (d *Generic) GetRevision(ctx context.Context, revision int64) (*sql.Rows, error)
- func (d *Generic) GetSize(ctx context.Context) (int64, error)
- func (d *Generic) Insert(ctx context.Context, key string, create, delete bool, ...) (id int64, err error)
- func (d *Generic) IsFill(key string) bool
- func (d *Generic) List(ctx context.Context, prefix, startKey string, limit, revision int64, ...) (*sql.Rows, error)
- func (d *Generic) ListCurrent(ctx context.Context, prefix, startKey string, limit int64, includeDeleted bool) (*sql.Rows, error)
- func (d *Generic) Prepare() error
- func (d *Generic) SetCompactRevision(ctx context.Context, revision int64) error
- type Stripped
- type TranslateErr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdmissionControlPolicy ¶
type AdmissionControlPolicy interface { // Admit checks whether the query should be admitted. // If the query is not admitted, a non-nil error is returned with the reason why the query was denied. // If the query is admitted, then the error will be nil and a callback function is returned to the caller. // The caller must execute it after finishing the query Admit(ctx context.Context, txName string) (callOnFinish func(), err error) }
AdmissionControlPolicy interface defines the admission policy contract.
func NewAdmissionControlPolicy ¶
func NewAdmissionControlPolicy(policyName string, onlyWriteQueries bool, limitMaxConcurrentTxn int64) AdmissionControlPolicy
type Generic ¶
type Generic struct { sync.Mutex LockWrites bool LastInsertID bool DB *sql.DB GetCurrentSQL string GetRevisionSQL string RevisionSQL string ListRevisionStartSQL string GetRevisionAfterSQL string CountCurrentSQL string CountRevisionSQL string AfterSQLPrefix string AfterSQL string DeleteSQL string UpdateCompactSQL string InsertSQL string FillSQL string InsertLastInsertIDSQL string GetSizeSQL string Retry ErrRetry TranslateErr TranslateErr ErrCode ErrCode AdmissionControlPolicy AdmissionControlPolicy // CompactInterval is interval between database compactions performed by kine. CompactInterval time.Duration // PollInterval is the event poll interval used by kine. PollInterval time.Duration // contains filtered or unexported fields }
func (*Generic) AfterPrefix ¶
func (*Generic) CountCurrent ¶
func (*Generic) CurrentRevision ¶
func (*Generic) DeleteRevision ¶
func (*Generic) GetCompactInterval ¶
func (*Generic) GetCompactRevision ¶
func (*Generic) GetPollInterval ¶
func (*Generic) GetRevision ¶
func (*Generic) ListCurrent ¶
type TranslateErr ¶
Click to show internal directories.
Click to hide internal directories.