op

package
v0.0.0-...-ba0e684 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckAndSet

type CheckAndSet struct {
	Req *rrdb.CheckAndSetRequest
}

CheckAndSet inherits op.Request.

func (*CheckAndSet) Run

func (r *CheckAndSet) Run(ctx context.Context, gpid *base.Gpid, partitionHash uint64, rs *session.ReplicaSession) (interface{}, error)

Run operation.

func (*CheckAndSet) Validate

func (r *CheckAndSet) Validate() error

Validate arguments.

type CheckAndSetResult

type CheckAndSetResult struct {
	SetSucceed         bool
	CheckValue         []byte
	CheckValueExist    bool
	CheckValueReturned bool
}

CheckAndSetResult is the result of a CAS.

type Del

type Del struct {
	HashKey []byte
	SortKey []byte
	// contains filtered or unexported fields
}

Del inherits op.Request.

func (*Del) Run

func (r *Del) Run(ctx context.Context, gpid *base.Gpid, partitionHash uint64, rs *session.ReplicaSession) (interface{}, error)

Run operation.

func (*Del) Validate

func (r *Del) Validate() error

Validate arguments.

type Get

type Get struct {
	HashKey []byte
	SortKey []byte
	// contains filtered or unexported fields
}

Get inherits op.Request.

func (*Get) Run

func (r *Get) Run(ctx context.Context, gpid *base.Gpid, partitionHash uint64, rs *session.ReplicaSession) (interface{}, error)

Run operation.

func (*Get) Validate

func (r *Get) Validate() error

Validate arguments.

type Incr

type Incr struct {
	HashKey   []byte
	SortKey   []byte
	Increment int64
	// contains filtered or unexported fields
}

Incr inherits op.Request.

func (*Incr) Run

func (r *Incr) Run(ctx context.Context, gpid *base.Gpid, partitionHash uint64, rs *session.ReplicaSession) (interface{}, error)

Run operation.

func (*Incr) Validate

func (r *Incr) Validate() error

Validate arguments.

type MultiDel

type MultiDel struct {
	HashKey  []byte
	SortKeys [][]byte
	// contains filtered or unexported fields
}

MultiDel inherits op.Request.

func (*MultiDel) Run

func (r *MultiDel) Run(ctx context.Context, gpid *base.Gpid, partitionHash uint64, rs *session.ReplicaSession) (interface{}, error)

Run operation.

func (*MultiDel) Validate

func (r *MultiDel) Validate() error

Validate arguments.

type MultiGet

type MultiGet struct {
	HashKey      []byte
	SortKeys     [][]byte
	StartSortkey []byte
	StopSortkey  []byte

	Req *rrdb.MultiGetRequest
}

MultiGet inherits op.Request.

func (*MultiGet) Run

func (r *MultiGet) Run(ctx context.Context, gpid *base.Gpid, partitionHash uint64, rs *session.ReplicaSession) (interface{}, error)

Run operation.

func (*MultiGet) Validate

func (r *MultiGet) Validate() error

Validate arguments.

type MultiGetResult

type MultiGetResult struct {
	KVs        []*rrdb.KeyValue
	AllFetched bool
}

MultiGetResult

type MultiSet

type MultiSet struct {
	HashKey  []byte
	SortKeys [][]byte
	Values   [][]byte
	TTL      time.Duration
	// contains filtered or unexported fields
}

MultiSet inherits op.Request.

func (*MultiSet) Run

func (r *MultiSet) Run(ctx context.Context, gpid *base.Gpid, partitionHash uint64, rs *session.ReplicaSession) (interface{}, error)

Run operation.

func (*MultiSet) Validate

func (r *MultiSet) Validate() error

Validate arguments.

type Request

type Request interface {
	Validate() error

	Run(ctx context.Context, gpid *base.Gpid, partitionHash uint64, rs *session.ReplicaSession) (interface{}, error)
}

Request is the generic interface of all Pegasus operations.

type Set

type Set struct {
	HashKey []byte
	SortKey []byte
	Value   []byte
	TTL     time.Duration
	// contains filtered or unexported fields
}

Set inherits op.Request.

func (*Set) Run

func (r *Set) Run(ctx context.Context, gpid *base.Gpid, partitionHash uint64, rs *session.ReplicaSession) (interface{}, error)

Run operation.

func (*Set) Validate

func (r *Set) Validate() error

Validate arguments.

type SortKeyCount

type SortKeyCount struct {
	HashKey []byte
	// contains filtered or unexported fields
}

SortKeyCount inherits op.Request.

func (*SortKeyCount) Run

func (r *SortKeyCount) Run(ctx context.Context, gpid *base.Gpid, partitionHash uint64, rs *session.ReplicaSession) (interface{}, error)

Run operation.

func (*SortKeyCount) Validate

func (r *SortKeyCount) Validate() error

Validate arguments.

type TTL

type TTL struct {
	HashKey []byte
	SortKey []byte
	// contains filtered or unexported fields
}

TTL inherits op.Request.

func (*TTL) Run

func (r *TTL) Run(ctx context.Context, gpid *base.Gpid, partitionHash uint64, rs *session.ReplicaSession) (interface{}, error)

Run operation. Returns -2 if entry doesn't exist.

func (*TTL) Validate

func (r *TTL) Validate() error

Validate arguments.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL