riak-go-client: github.com/basho/riak-go-client Index | Examples | Files | Directories

package riak

import "github.com/basho/riak-go-client"

Package riak provides the interfaces needed to interact with Riak KV using Protocol Buffers. Riak KV is a distributed key-value datastore designed to be fault tolerant, scalable, and flexible.

Currently, this library was written for and tested against Riak KV 2.0+.

TL;DR;

import (
	"fmt"
	"os"
	riak "github.com/basho/riak-go-client"
)

func main() {
	nodeOpts := &riak.NodeOptions{
		RemoteAddress: "127.0.0.1:8087",
	}

	var node *riak.Node
	var err error
	if node, err = riak.NewNode(nodeOpts); err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	}

	nodes := []*riak.Node{node}
	opts := &riak.ClusterOptions{
		Nodes: nodes,
	}

	cluster, err := riak.NewCluster(opts)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	}

	defer func() {
		if err := cluster.Stop(); err != nil {
			fmt.Println(err.Error())
			os.Exit(1)
		}
	}()

	if err := cluster.Start(); err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	}

	obj := &riak.Object{
		ContentType:     "text/plain",
		Charset:         "utf-8",
		ContentEncoding: "utf-8",
		Value:           []byte("this is a value in Riak"),
	}

	cmd, err := riak.NewStoreValueCommandBuilder().
		WithBucket("testBucketName").
		WithContent(obj).
		Build()
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	}

	if err := cluster.Execute(cmd); err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	}

	svc := cmd.(*riak.StoreValueCommand)
	rsp := svc.Response
	fmt.Println(rsp.GeneratedKey)
}

Index

Examples

Package Files

async.go client.go cluster.go command.go connection.go connection_manager.go consts.go crdt_commands.go doc.go error.go kv_commands.go locatable.go logging.go messages.go misc_commands.go net.go node.go node_manager.go object.go queue.go rpb.go states.go ts_commands.go yz_commands.go

Constants

const ErrClientInvalidRemoteAddress = "[Client] invalid RemoteAddress '%s'"
const ErrClusterNoNodesAvailable = "[Cluster] all retries exhausted and/or no nodes available to execute command"

Variables

var (
    ErrClientOptionsRequired     = newClientError("[Client] options are required", nil)
    ErrClientMissingRequiredData = newClientError("[Client] options must specify either a Cluster or a set of RemoteAddresses", nil)
)
var (
    ErrClusterNodesMustBeNonNil               = newClientError("[Cluster] all nodes must be non-nil", nil)
    ErrClusterCommandRequired                 = newClientError("[Cluster] Command must be non-nil", nil)
    ErrClusterAsyncRequiresChannelOrWaitGroup = newClientError("[Cluster] ExecuteAsync argument requires a channel or sync.WaitGroup to indicate completion", nil)
    ErrClusterEnqueueWhileShuttingDown        = newClientError("[Cluster] will not enqueue command, shutting down", nil)
    ErrClusterShuttingDown                    = newClientError("[Cluster] will not execute command, shutting down", nil)
    ErrClusterNodeMustBeNonNil                = newClientError("[Cluster] node argument must be non-nil", nil)
)

Cluster errors

var (
    ErrCannotRead  = errors.New("Cannot read from a non-active or closed connection")
    ErrCannotWrite = errors.New("Cannot write to a non-active or closed connection")
)

Connection errors

var (
    ErrConnectionManagerRequiresOptions         = newClientError("[connectionManager] new manager requires options", nil)
    ErrConnectionManagerRequiresAddress         = newClientError("[connectionManager] new manager requires non-nil address", nil)
    ErrConnectionManagerMaxMustBeGreaterThanMin = newClientError("[connectionManager] new connection manager maxConnections must be greater than minConnections", nil)
    ErrConnMgrAllConnectionsInUse               = newClientError("[connectionManager] all connections in use / max connections reached", nil)
)
var (
    ErrAddressRequired      = newClientError("RemoteAddress is required in options", nil)
    ErrAuthMissingConfig    = newClientError("[Connection] authentication is missing TLS config", nil)
    ErrAuthTLSUpgradeFailed = newClientError("[Connection] upgrading to TLS connection failed", nil)
    ErrBucketRequired       = newClientError("Bucket is required", nil)
    ErrKeyRequired          = newClientError("Key is required", nil)
    ErrNilOptions           = newClientError("[Command] options must be non-nil", nil)
    ErrOptionsRequired      = newClientError("Options are required", nil)
    ErrZeroLength           = newClientError("[Command] 0 byte data response", nil)
    ErrTableRequired        = newClientError("Table is required", nil)
    ErrQueryRequired        = newClientError("Query is required", nil)
    ErrListingDisabled      = newClientError("Bucket and key list operations are expensive and should not be used in production.", nil)
)

Client errors

var EnableDebugLogging = false

If true, debug messages will be written to the log

var ErrDefaultNodeManagerRequiresNode = newClientError("Must pass at least one node to default node manager", nil)

func SetErrorLogger Uses

func SetErrorLogger(logger *log.Logger)

SetErrorLogger sets the logger used for errors

func SetLogger Uses

func SetLogger(logger *log.Logger)

SetLogger sets the standard logger used for WARN and DEBUG (if enabled)

func ToUnixMillis Uses

func ToUnixMillis(t time.Time) int64

ToUnixMillis converts a time.Time to Unix milliseconds since UTC epoch

type Async Uses

type Async struct {
    Command Command
    Done    chan Command
    Wait    *sync.WaitGroup
    Error   error
    // contains filtered or unexported fields
}

Async object is used to pass required arguments to execute a Command asynchronously

type AuthOptions Uses

type AuthOptions struct {
    User      string
    Password  string
    TlsConfig *tls.Config
}

AuthOptions object contains the authentication credentials and tls config

type Client Uses

type Client struct {
    // contains filtered or unexported fields
}

Client object contains your cluster object

func NewClient Uses

func NewClient(opts *NewClientOptions) (*Client, error)

NewClient generates a new Client object using the provided options

func (*Client) Cluster Uses

func (c *Client) Cluster() *Cluster

func (*Client) Execute Uses

func (c *Client) Execute(cmd Command) error

Execute (synchronously) the provided Command against the cluster

func (*Client) ExecuteAsync Uses

func (c *Client) ExecuteAsync(a *Async) error

Execute (asynchronously) the provided Command against the cluster

func (*Client) Ping Uses

func (c *Client) Ping() (bool, error)

Pings the cluster

func (*Client) Stop Uses

func (c *Client) Stop() error

Stop the nodes in the cluster and the cluster itself

type ClientError Uses

type ClientError struct {
    Errmsg     string
    InnerError error
}

func (ClientError) Error Uses

func (e ClientError) Error() (s string)

type Cluster Uses

type Cluster struct {
    sync.Mutex
    // contains filtered or unexported fields
}

Cluster object contains your pool of Node objects, the NodeManager and the current stateData object of the cluster

func NewCluster Uses

func NewCluster(options *ClusterOptions) (*Cluster, error)

NewCluster generates a new Cluster object using the provided ClusterOptions object

Code:

cluster, err := NewCluster(nil)
if err != nil {
    panic(fmt.Sprintf("Error building cluster object: %s", err.Error()))
}
fmt.Println(cluster.nodes[0].addr.String())

Output:

127.0.0.1:8087

func (*Cluster) AddNode Uses

func (c *Cluster) AddNode(n *Node) error

Adds a node to the cluster and starts it

func (*Cluster) Execute Uses

func (c *Cluster) Execute(command Command) error

Execute (synchronously) the provided Command against the active pooled Nodes using the NodeManager

func (*Cluster) ExecuteAsync Uses

func (c *Cluster) ExecuteAsync(async *Async) error

Execute (asynchronously) the provided Command against the active pooled Nodes using the NodeManager

func (*Cluster) RemoveNode Uses

func (c *Cluster) RemoveNode(n *Node) error

Stops the node and removes from the cluster

func (*Cluster) Start Uses

func (c *Cluster) Start() error

Start opens connections with your configured nodes and adds them to the active pool

func (*Cluster) Stop Uses

func (c *Cluster) Stop() (err error)

Stop closes the connections with your configured nodes and removes them from the active pool

func (*Cluster) String Uses

func (c *Cluster) String() string

String returns a formatted string that lists status information for the Cluster

type ClusterOptions Uses

type ClusterOptions struct {
    Nodes                  []*Node
    NoDefaultNode          bool
    NodeManager            NodeManager
    ExecutionAttempts      byte
    QueueMaxDepth          uint16
    QueueExecutionInterval time.Duration
}

ClusterOptions object contains your pool of Node objects and the NodeManager If the NodeManager is not defined, the defaultNodeManager is used

type Command Uses

type Command interface {
    Name() string
    Success() bool
    Error() error
    // contains filtered or unexported methods
}

Command interface enforces proper structure of a Command object

type CommandBuilder Uses

type CommandBuilder interface {
    Build() (Command, error)
}

CommandBuilder interface requires Build() method for generating the Command to be executed

type CommitHook Uses

type CommitHook struct {
    Name   string
    ModFun *ModFun
}

CommitHook object is used when fetching or updating pre- or post- commit hook bucket properties on Riak

type ConflictResolver Uses

type ConflictResolver interface {
    Resolve([]*Object) []*Object
}

ConflictResolver is an interface to handle sibling conflicts for a key

type DeleteIndexCommand Uses

type DeleteIndexCommand struct {
    Response bool
    // contains filtered or unexported fields
}

DeleteIndexCommand is used to delete a search index from Riak

func (*DeleteIndexCommand) Error Uses

func (cmd *DeleteIndexCommand) Error() error

func (*DeleteIndexCommand) Name Uses

func (cmd *DeleteIndexCommand) Name() string

Name identifies this command

func (*DeleteIndexCommand) Success Uses

func (cmd *DeleteIndexCommand) Success() bool

type DeleteIndexCommandBuilder Uses

type DeleteIndexCommandBuilder struct {
    // contains filtered or unexported fields
}

DeleteIndexCommandBuilder type is required for creating new instances of DeleteIndexCommand

command, err := NewDeleteIndexCommandBuilder().
	WithIndexName("myIndexName").
	Build()

func NewDeleteIndexCommandBuilder Uses

func NewDeleteIndexCommandBuilder() *DeleteIndexCommandBuilder

NewDeleteIndexCommandBuilder is a factory function for generating the command builder struct

func (*DeleteIndexCommandBuilder) Build Uses

func (builder *DeleteIndexCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*DeleteIndexCommandBuilder) WithIndexName Uses

func (builder *DeleteIndexCommandBuilder) WithIndexName(indexName string) *DeleteIndexCommandBuilder

WithIndexName sets the index to use for the command

type DeleteValueCommand Uses

type DeleteValueCommand struct {
    Response bool
    // contains filtered or unexported fields
}

DeleteValueCommand is used to delete a value from Riak KV.

func (*DeleteValueCommand) Error Uses

func (cmd *DeleteValueCommand) Error() error

func (*DeleteValueCommand) Name Uses

func (cmd *DeleteValueCommand) Name() string

Name identifies this command

func (*DeleteValueCommand) Success Uses

func (cmd *DeleteValueCommand) Success() bool

type DeleteValueCommandBuilder Uses

type DeleteValueCommandBuilder struct {
    // contains filtered or unexported fields
}

DeleteValueCommandBuilder type is required for creating new instances of DeleteValueCommand

deleteValue := NewDeleteValueCommandBuilder().
	WithBucketType("myBucketType").
	WithBucket("myBucket").
	WithKey("myKey").
	WithVClock(vclock).
	Build()

func NewDeleteValueCommandBuilder Uses

func NewDeleteValueCommandBuilder() *DeleteValueCommandBuilder

NewDeleteValueCommandBuilder is a factory function for generating the command builder struct

func (*DeleteValueCommandBuilder) Build Uses

func (builder *DeleteValueCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*DeleteValueCommandBuilder) WithBucket Uses

func (builder *DeleteValueCommandBuilder) WithBucket(bucket string) *DeleteValueCommandBuilder

WithBucket sets the bucket to be used by the command

func (*DeleteValueCommandBuilder) WithBucketType Uses

func (builder *DeleteValueCommandBuilder) WithBucketType(bucketType string) *DeleteValueCommandBuilder

WithBucketType sets the bucket-type to be used by the command. If omitted, 'default' is used

func (*DeleteValueCommandBuilder) WithDw Uses

func (builder *DeleteValueCommandBuilder) WithDw(dw uint32) *DeleteValueCommandBuilder

WithDw (durable writes) sets the number of nodes that must report back a successful write to backend storage in order for the command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*DeleteValueCommandBuilder) WithKey Uses

func (builder *DeleteValueCommandBuilder) WithKey(key string) *DeleteValueCommandBuilder

WithKey sets the key to be used by the command to read / write values

func (*DeleteValueCommandBuilder) WithPr Uses

func (builder *DeleteValueCommandBuilder) WithPr(pr uint32) *DeleteValueCommandBuilder

WithPr sets the number of primary nodes (N) that must be read from in order for the command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*DeleteValueCommandBuilder) WithPw Uses

func (builder *DeleteValueCommandBuilder) WithPw(pw uint32) *DeleteValueCommandBuilder

WithPw sets the number of primary nodes (N) that must report back a successful write in order for the command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*DeleteValueCommandBuilder) WithR Uses

func (builder *DeleteValueCommandBuilder) WithR(r uint32) *DeleteValueCommandBuilder

WithR sets the number of nodes that must report back a successful read in order for the command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*DeleteValueCommandBuilder) WithRw Uses

func (builder *DeleteValueCommandBuilder) WithRw(rw uint32) *DeleteValueCommandBuilder

WithRw (delete quorum) sets the number of nodes that must report back a successful delete to backend storage in order for the command operation to be considered a success by Riak. It represents the read and write operations that are completed internal to Riak to complete a delete. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*DeleteValueCommandBuilder) WithTimeout Uses

func (builder *DeleteValueCommandBuilder) WithTimeout(timeout time.Duration) *DeleteValueCommandBuilder

WithTimeout sets a timeout to be used for this command operation

func (*DeleteValueCommandBuilder) WithVClock Uses

func (builder *DeleteValueCommandBuilder) WithVClock(vclock []byte) *DeleteValueCommandBuilder

WithVClock sets the vector clock.

If not set siblings may be created depending on bucket properties.

func (*DeleteValueCommandBuilder) WithW Uses

func (builder *DeleteValueCommandBuilder) WithW(w uint32) *DeleteValueCommandBuilder

WithW sets the number of nodes that must report back a successful write in order for then command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

type FetchBucketPropsCommand Uses

type FetchBucketPropsCommand struct {
    Response *FetchBucketPropsResponse
    // contains filtered or unexported fields
}

FetchBucketPropsCommand is used to fetch the active / non-default properties for a bucket

func (*FetchBucketPropsCommand) Error Uses

func (cmd *FetchBucketPropsCommand) Error() error

func (*FetchBucketPropsCommand) Name Uses

func (cmd *FetchBucketPropsCommand) Name() string

func (*FetchBucketPropsCommand) Success Uses

func (cmd *FetchBucketPropsCommand) Success() bool

type FetchBucketPropsCommandBuilder Uses

type FetchBucketPropsCommandBuilder struct {
    // contains filtered or unexported fields
}

FetchBucketPropsCommandBuilder type is required for creating new instances of FetchBucketPropsCommand

command, err := NewFetchBucketPropsCommandBuilder().
	WithBucketType("myBucketType").
	WithBucket("myBucket").
	Build()

func NewFetchBucketPropsCommandBuilder Uses

func NewFetchBucketPropsCommandBuilder() *FetchBucketPropsCommandBuilder

NewFetchBucketPropsCommandBuilder is a factory function for generating the command builder struct

func (*FetchBucketPropsCommandBuilder) Build Uses

func (builder *FetchBucketPropsCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*FetchBucketPropsCommandBuilder) WithBucket Uses

func (builder *FetchBucketPropsCommandBuilder) WithBucket(bucket string) *FetchBucketPropsCommandBuilder

WithBucket sets the bucket to be used by the command

func (*FetchBucketPropsCommandBuilder) WithBucketType Uses

func (builder *FetchBucketPropsCommandBuilder) WithBucketType(bucketType string) *FetchBucketPropsCommandBuilder

WithBucketType sets the bucket-type to be used by the command. If omitted, 'default' is used

type FetchBucketPropsResponse Uses

type FetchBucketPropsResponse struct {
    NVal          uint32
    AllowMult     bool
    LastWriteWins bool
    HasPrecommit  bool
    HasPostcommit bool
    OldVClock     uint32
    YoungVClock   uint32
    BigVClock     uint32
    SmallVClock   uint32
    R             uint32
    Pr            uint32
    W             uint32
    Pw            uint32
    Dw            uint32
    Rw            uint32
    BasicQuorum   bool
    NotFoundOk    bool
    Search        bool
    Consistent    bool
    Repl          ReplMode
    Backend       string
    SearchIndex   string
    DataType      string
    PreCommit     []*CommitHook
    PostCommit    []*CommitHook
    ChashKeyFun   *ModFun
    LinkFun       *ModFun
    HllPrecision  uint32
}

FetchBucketPropsResponse contains the response data for both FetchBucketPropsCommand and FetchBucketTypePropsCommand

type FetchBucketTypePropsCommand Uses

type FetchBucketTypePropsCommand struct {
    Response *FetchBucketPropsResponse
    // contains filtered or unexported fields
}

FetchBucketTypePropsCommand is used to fetch the active / non-default properties for a bucket type

func (*FetchBucketTypePropsCommand) Error Uses

func (cmd *FetchBucketTypePropsCommand) Error() error

func (*FetchBucketTypePropsCommand) Name Uses

func (cmd *FetchBucketTypePropsCommand) Name() string

func (*FetchBucketTypePropsCommand) Success Uses

func (cmd *FetchBucketTypePropsCommand) Success() bool

type FetchBucketTypePropsCommandBuilder Uses

type FetchBucketTypePropsCommandBuilder struct {
    // contains filtered or unexported fields
}

FetchBucketTypePropsCommandBuilder type is required for creating new instances of FetchBucketTypePropsCommand

command, err := NewFetchBucketTypePropsCommandBuilder().
	WithBucketType("myBucketType").
	Build()

func NewFetchBucketTypePropsCommandBuilder Uses

func NewFetchBucketTypePropsCommandBuilder() *FetchBucketTypePropsCommandBuilder

NewFetchBucketTypePropsCommandBuilder is a factory function for generating the command builder struct

func (*FetchBucketTypePropsCommandBuilder) Build Uses

func (builder *FetchBucketTypePropsCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*FetchBucketTypePropsCommandBuilder) WithBucketType Uses

func (builder *FetchBucketTypePropsCommandBuilder) WithBucketType(bucketType string) *FetchBucketTypePropsCommandBuilder

WithBucketType sets the bucket-type to be used by the command. If omitted, 'default' is used

type FetchCounterCommand Uses

type FetchCounterCommand struct {
    Response *FetchCounterResponse
    // contains filtered or unexported fields
}

FetchCounterCommand fetches a counter CRDT from Riak

func (*FetchCounterCommand) Error Uses

func (cmd *FetchCounterCommand) Error() error

func (*FetchCounterCommand) Name Uses

func (cmd *FetchCounterCommand) Name() string

Name identifies this command

func (*FetchCounterCommand) Success Uses

func (cmd *FetchCounterCommand) Success() bool

type FetchCounterCommandBuilder Uses

type FetchCounterCommandBuilder struct {
    // contains filtered or unexported fields
}

FetchCounterCommandBuilder type is required for creating new instances of FetchCounterCommand

command, err := NewFetchCounterCommandBuilder().
	WithBucketType("myBucketType").
	WithBucket("myBucket").
	WithKey("myKey").
	Build()

func NewFetchCounterCommandBuilder Uses

func NewFetchCounterCommandBuilder() *FetchCounterCommandBuilder

NewFetchCounterCommandBuilder is a factory function for generating the command builder struct

func (*FetchCounterCommandBuilder) Build Uses

func (builder *FetchCounterCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*FetchCounterCommandBuilder) WithBasicQuorum Uses

func (builder *FetchCounterCommandBuilder) WithBasicQuorum(basicQuorum bool) *FetchCounterCommandBuilder

WithBasicQuorum sets basic_quorum, whether to return early in some failure cases (eg. when r=1 and you get 2 errors and a success basic_quorum=true would return an error)

See http://basho.com/posts/technical/riaks-config-behaviors-part-3/

func (*FetchCounterCommandBuilder) WithBucket Uses

func (builder *FetchCounterCommandBuilder) WithBucket(bucket string) *FetchCounterCommandBuilder

WithBucket sets the bucket to be used by the command

func (*FetchCounterCommandBuilder) WithBucketType Uses

func (builder *FetchCounterCommandBuilder) WithBucketType(bucketType string) *FetchCounterCommandBuilder

WithBucketType sets the bucket-type to be used by the command. If omitted, 'default' is used

func (*FetchCounterCommandBuilder) WithKey Uses

func (builder *FetchCounterCommandBuilder) WithKey(key string) *FetchCounterCommandBuilder

WithKey sets the key to be used by the command to read / write values

func (*FetchCounterCommandBuilder) WithNotFoundOk Uses

func (builder *FetchCounterCommandBuilder) WithNotFoundOk(notFoundOk bool) *FetchCounterCommandBuilder

WithNotFoundOk sets notfound_ok, whether to treat notfounds as successful reads for the purposes of R

See http://basho.com/posts/technical/riaks-config-behaviors-part-3/

func (*FetchCounterCommandBuilder) WithPr Uses

func (builder *FetchCounterCommandBuilder) WithPr(pr uint32) *FetchCounterCommandBuilder

WithPr sets the number of primary nodes (N) that must be read from in order for the command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*FetchCounterCommandBuilder) WithR Uses

func (builder *FetchCounterCommandBuilder) WithR(r uint32) *FetchCounterCommandBuilder

WithR sets the number of nodes that must report back a successful read in order for the command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*FetchCounterCommandBuilder) WithTimeout Uses

func (builder *FetchCounterCommandBuilder) WithTimeout(timeout time.Duration) *FetchCounterCommandBuilder

WithTimeout sets a timeout to be used for this command operation

type FetchCounterResponse Uses

type FetchCounterResponse struct {
    IsNotFound   bool
    CounterValue int64
}

FetchCounterResponse contains the response data for a FetchCounterCommand

type FetchHllCommand Uses

type FetchHllCommand struct {
    Response *FetchHllResponse
    // contains filtered or unexported fields
}

FetchHllCommand fetches an Hll Data Type from Riak

func (*FetchHllCommand) Error Uses

func (cmd *FetchHllCommand) Error() error

func (*FetchHllCommand) Name Uses

func (cmd *FetchHllCommand) Name() string

Name identifies this command

func (*FetchHllCommand) Success Uses

func (cmd *FetchHllCommand) Success() bool

type FetchHllCommandBuilder Uses

type FetchHllCommandBuilder struct {
    // contains filtered or unexported fields
}

FetchHllCommandBuilder type is required for creating new instances of FetchHllCommand

command, err := NewFetchHllCommandBuilder().
	WithBucketType("myBucketType").
	WithBucket("myBucket").
	WithKey("myKey").
	Build()

func NewFetchHllCommandBuilder Uses

func NewFetchHllCommandBuilder() *FetchHllCommandBuilder

NewFetchHllCommandBuilder is a factory function for generating the command builder struct

func (*FetchHllCommandBuilder) Build Uses

func (builder *FetchHllCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*FetchHllCommandBuilder) WithBasicQuorum Uses

func (builder *FetchHllCommandBuilder) WithBasicQuorum(basicQuorum bool) *FetchHllCommandBuilder

WithBasicQuorum sets basic_quorum, whether to return early in some failure cases (eg. when r=1 and you get 2 errors and a success basic_quorum=true would return an error)

See http://basho.com/posts/technical/riaks-config-behaviors-part-3/

func (*FetchHllCommandBuilder) WithBucket Uses

func (builder *FetchHllCommandBuilder) WithBucket(bucket string) *FetchHllCommandBuilder

WithBucket sets the bucket to be used by the command

func (*FetchHllCommandBuilder) WithBucketType Uses

func (builder *FetchHllCommandBuilder) WithBucketType(bucketType string) *FetchHllCommandBuilder

WithBucketType sets the bucket-type to be used by the command. If omitted, 'default' is used

func (*FetchHllCommandBuilder) WithKey Uses

func (builder *FetchHllCommandBuilder) WithKey(key string) *FetchHllCommandBuilder

WithKey sets the key to be used by the command to read / write values

func (*FetchHllCommandBuilder) WithNotFoundOk Uses

func (builder *FetchHllCommandBuilder) WithNotFoundOk(notFoundOk bool) *FetchHllCommandBuilder

WithNotFoundOk sets notfound_ok, whether to treat notfounds as successful reads for the purposes of R

See http://basho.com/posts/technical/riaks-config-behaviors-part-3/

func (*FetchHllCommandBuilder) WithPr Uses

func (builder *FetchHllCommandBuilder) WithPr(pr uint32) *FetchHllCommandBuilder

WithPr sets the number of primary nodes (N) that must be read from in order for the command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*FetchHllCommandBuilder) WithR Uses

func (builder *FetchHllCommandBuilder) WithR(r uint32) *FetchHllCommandBuilder

WithR sets the number of nodes that must report back a successful read in order for the command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*FetchHllCommandBuilder) WithTimeout Uses

func (builder *FetchHllCommandBuilder) WithTimeout(timeout time.Duration) *FetchHllCommandBuilder

WithTimeout sets a timeout to be used for this command operation

type FetchHllResponse Uses

type FetchHllResponse struct {
    IsNotFound  bool
    Cardinality uint64
}

FetchHllResponse contains the response data for a FetchHllCommand

type FetchIndexCommand Uses

type FetchIndexCommand struct {
    Response []*SearchIndex
    // contains filtered or unexported fields
}

FetchIndexCommand is used to fetch a search index from Riak

func (*FetchIndexCommand) Error Uses

func (cmd *FetchIndexCommand) Error() error

func (*FetchIndexCommand) Name Uses

func (cmd *FetchIndexCommand) Name() string

Name identifies this command

func (*FetchIndexCommand) Success Uses

func (cmd *FetchIndexCommand) Success() bool

type FetchIndexCommandBuilder Uses

type FetchIndexCommandBuilder struct {
    // contains filtered or unexported fields
}

FetchIndexCommandBuilder type is required for creating new instances of FetchIndexCommand

command, err := NewFetchIndexCommandBuilder().
	WithIndexName("myIndexName").
	Build()

func NewFetchIndexCommandBuilder Uses

func NewFetchIndexCommandBuilder() *FetchIndexCommandBuilder

NewFetchIndexCommandBuilder is a factory function for generating the command builder struct

func (*FetchIndexCommandBuilder) Build Uses

func (builder *FetchIndexCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*FetchIndexCommandBuilder) WithIndexName Uses

func (builder *FetchIndexCommandBuilder) WithIndexName(indexName string) *FetchIndexCommandBuilder

WithIndexName sets the index to use for the command

type FetchMapCommand Uses

type FetchMapCommand struct {
    Response *FetchMapResponse
    // contains filtered or unexported fields
}

FetchMapCommand fetches a map CRDT from Riak

func (*FetchMapCommand) Error Uses

func (cmd *FetchMapCommand) Error() error

func (*FetchMapCommand) Name Uses

func (cmd *FetchMapCommand) Name() string

Name identifies this command

func (*FetchMapCommand) Success Uses

func (cmd *FetchMapCommand) Success() bool

type FetchMapCommandBuilder Uses

type FetchMapCommandBuilder struct {
    // contains filtered or unexported fields
}

FetchMapCommandBuilder type is required for creating new instances of FetchMapCommand

command, err := NewFetchMapCommandBuilder().
	WithBucketType("myBucketType").
	WithBucket("myBucket").
	WithKey("myKey").
	Build()

func NewFetchMapCommandBuilder Uses

func NewFetchMapCommandBuilder() *FetchMapCommandBuilder

NewFetchMapCommandBuilder is a factory function for generating the command builder struct

func (*FetchMapCommandBuilder) Build Uses

func (builder *FetchMapCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*FetchMapCommandBuilder) WithBasicQuorum Uses

func (builder *FetchMapCommandBuilder) WithBasicQuorum(basicQuorum bool) *FetchMapCommandBuilder

WithBasicQuorum sets basic_quorum, whether to return early in some failure cases (eg. when r=1 and you get 2 errors and a success basic_quorum=true would return an error)

See http://basho.com/posts/technical/riaks-config-behaviors-part-3/

func (*FetchMapCommandBuilder) WithBucket Uses

func (builder *FetchMapCommandBuilder) WithBucket(bucket string) *FetchMapCommandBuilder

WithBucket sets the bucket to be used by the command

func (*FetchMapCommandBuilder) WithBucketType Uses

func (builder *FetchMapCommandBuilder) WithBucketType(bucketType string) *FetchMapCommandBuilder

WithBucketType sets the bucket-type to be used by the command. If omitted, 'default' is used

func (*FetchMapCommandBuilder) WithKey Uses

func (builder *FetchMapCommandBuilder) WithKey(key string) *FetchMapCommandBuilder

WithKey sets the key to be used by the command to read / write values

func (*FetchMapCommandBuilder) WithNotFoundOk Uses

func (builder *FetchMapCommandBuilder) WithNotFoundOk(notFoundOk bool) *FetchMapCommandBuilder

WithNotFoundOk sets notfound_ok, whether to treat notfounds as successful reads for the purposes of R

See http://basho.com/posts/technical/riaks-config-behaviors-part-3/

func (*FetchMapCommandBuilder) WithPr Uses

func (builder *FetchMapCommandBuilder) WithPr(pr uint32) *FetchMapCommandBuilder

WithPr sets the number of primary nodes (N) that must be read from in order for the command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*FetchMapCommandBuilder) WithR Uses

func (builder *FetchMapCommandBuilder) WithR(r uint32) *FetchMapCommandBuilder

WithR sets the number of nodes that must report back a successful read in order for the command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*FetchMapCommandBuilder) WithTimeout Uses

func (builder *FetchMapCommandBuilder) WithTimeout(timeout time.Duration) *FetchMapCommandBuilder

WithTimeout sets a timeout in milliseconds to be used for this command operation

type FetchMapResponse Uses

type FetchMapResponse struct {
    IsNotFound bool
    Context    []byte
    Map        *Map
}

FetchMapResponse contains the response data for a FetchMapCommand

type FetchPreflistCommand Uses

type FetchPreflistCommand struct {
    Response *FetchPreflistResponse
    // contains filtered or unexported fields
}

FetchPreflistCommand is used to fetch the preference list for a key from Riak KV

func (*FetchPreflistCommand) Error Uses

func (cmd *FetchPreflistCommand) Error() error

func (*FetchPreflistCommand) Name Uses

func (cmd *FetchPreflistCommand) Name() string

Name identifies this command

func (*FetchPreflistCommand) Success Uses

func (cmd *FetchPreflistCommand) Success() bool

type FetchPreflistCommandBuilder Uses

type FetchPreflistCommandBuilder struct {
    // contains filtered or unexported fields
}

FetchPreflistCommandBuilder type is required for creating new instances of FetchPreflistCommand

preflist, err := NewFetchPreflistCommandBuilder().
	WithBucketType("myBucketType").
	WithBucket("myBucket").
	WithKey("myKey").
	Build()

func NewFetchPreflistCommandBuilder Uses

func NewFetchPreflistCommandBuilder() *FetchPreflistCommandBuilder

NewFetchPreflistCommandBuilder is a factory function for generating the command builder struct

func (*FetchPreflistCommandBuilder) Build Uses

func (builder *FetchPreflistCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*FetchPreflistCommandBuilder) WithBucket Uses

func (builder *FetchPreflistCommandBuilder) WithBucket(bucket string) *FetchPreflistCommandBuilder

WithBucket sets the bucket to be used by the command

func (*FetchPreflistCommandBuilder) WithBucketType Uses

func (builder *FetchPreflistCommandBuilder) WithBucketType(bucketType string) *FetchPreflistCommandBuilder

WithBucketType sets the bucket-type to be used by the command. If omitted, 'default' is used

func (*FetchPreflistCommandBuilder) WithKey Uses

func (builder *FetchPreflistCommandBuilder) WithKey(key string) *FetchPreflistCommandBuilder

WithKey sets the key to be used by the command to read / write values

type FetchPreflistResponse Uses

type FetchPreflistResponse struct {
    Preflist []*PreflistItem
}

FetchPreflistResponse contains the response data for a FetchPreflistCommand

type FetchSchemaCommand Uses

type FetchSchemaCommand struct {
    Response *Schema
    // contains filtered or unexported fields
}

FetchSchemaCommand is used to GET a search schema from Riak

func (*FetchSchemaCommand) Error Uses

func (cmd *FetchSchemaCommand) Error() error

func (*FetchSchemaCommand) Name Uses

func (cmd *FetchSchemaCommand) Name() string

Name identifies this command

func (*FetchSchemaCommand) Success Uses

func (cmd *FetchSchemaCommand) Success() bool

type FetchSchemaCommandBuilder Uses

type FetchSchemaCommandBuilder struct {
    // contains filtered or unexported fields
}

FetchSchemaCommandBuilder type is required for creating new instances of FetchSchemaCommand

command, err := NewFetchSchemaCommandBuilder().
	WithSchemaName("mySchemaName").
	Build()

func NewFetchSchemaCommandBuilder Uses

func NewFetchSchemaCommandBuilder() *FetchSchemaCommandBuilder

NewFetchSchemaCommandBuilder is a factory function for generating the command builder struct

func (*FetchSchemaCommandBuilder) Build Uses

func (builder *FetchSchemaCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*FetchSchemaCommandBuilder) WithSchemaName Uses

func (builder *FetchSchemaCommandBuilder) WithSchemaName(schemaName string) *FetchSchemaCommandBuilder

WithSchemaName sets the schema that the command will use

type FetchSetCommand Uses

type FetchSetCommand struct {
    Response *FetchSetResponse
    // contains filtered or unexported fields
}

FetchSetCommand fetches a set CRDT from Riak

func (*FetchSetCommand) Error Uses

func (cmd *FetchSetCommand) Error() error

func (*FetchSetCommand) Name Uses

func (cmd *FetchSetCommand) Name() string

Name identifies this command

func (*FetchSetCommand) Success Uses

func (cmd *FetchSetCommand) Success() bool

type FetchSetCommandBuilder Uses

type FetchSetCommandBuilder struct {
    // contains filtered or unexported fields
}

FetchSetCommandBuilder type is required for creating new instances of FetchSetCommand

command, err := NewFetchSetCommandBuilder().
	WithBucketType("myBucketType").
	WithBucket("myBucket").
	WithKey("myKey").
	Build()

func NewFetchSetCommandBuilder Uses

func NewFetchSetCommandBuilder() *FetchSetCommandBuilder

NewFetchSetCommandBuilder is a factory function for generating the command builder struct

func (*FetchSetCommandBuilder) Build Uses

func (builder *FetchSetCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*FetchSetCommandBuilder) WithBasicQuorum Uses

func (builder *FetchSetCommandBuilder) WithBasicQuorum(basicQuorum bool) *FetchSetCommandBuilder

WithBasicQuorum sets basic_quorum, whether to return early in some failure cases (eg. when r=1 and you get 2 errors and a success basic_quorum=true would return an error)

See http://basho.com/posts/technical/riaks-config-behaviors-part-3/

func (*FetchSetCommandBuilder) WithBucket Uses

func (builder *FetchSetCommandBuilder) WithBucket(bucket string) *FetchSetCommandBuilder

WithBucket sets the bucket to be used by the command

func (*FetchSetCommandBuilder) WithBucketType Uses

func (builder *FetchSetCommandBuilder) WithBucketType(bucketType string) *FetchSetCommandBuilder

WithBucketType sets the bucket-type to be used by the command. If omitted, 'default' is used

func (*FetchSetCommandBuilder) WithKey Uses

func (builder *FetchSetCommandBuilder) WithKey(key string) *FetchSetCommandBuilder

WithKey sets the key to be used by the command to read / write values

func (*FetchSetCommandBuilder) WithNotFoundOk Uses

func (builder *FetchSetCommandBuilder) WithNotFoundOk(notFoundOk bool) *FetchSetCommandBuilder

WithNotFoundOk sets notfound_ok, whether to treat notfounds as successful reads for the purposes of R

See http://basho.com/posts/technical/riaks-config-behaviors-part-3/

func (*FetchSetCommandBuilder) WithPr Uses

func (builder *FetchSetCommandBuilder) WithPr(pr uint32) *FetchSetCommandBuilder

WithPr sets the number of primary nodes (N) that must be read from in order for the command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*FetchSetCommandBuilder) WithR Uses

func (builder *FetchSetCommandBuilder) WithR(r uint32) *FetchSetCommandBuilder

WithR sets the number of nodes that must report back a successful read in order for the command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*FetchSetCommandBuilder) WithTimeout Uses

func (builder *FetchSetCommandBuilder) WithTimeout(timeout time.Duration) *FetchSetCommandBuilder

WithTimeout sets a timeout to be used for this command operation

type FetchSetResponse Uses

type FetchSetResponse struct {
    IsNotFound bool
    Context    []byte
    SetValue   [][]byte
}

FetchSetResponse contains the response data for a FetchSetCommand

type FetchValueCommand Uses

type FetchValueCommand struct {
    Response *FetchValueResponse
    // contains filtered or unexported fields
}

FetchValueCommand is used to fetch / get a value from Riak KV

func (*FetchValueCommand) Error Uses

func (cmd *FetchValueCommand) Error() error

func (*FetchValueCommand) Name Uses

func (cmd *FetchValueCommand) Name() string

Name identifies this command

func (*FetchValueCommand) Success Uses

func (cmd *FetchValueCommand) Success() bool

type FetchValueCommandBuilder Uses

type FetchValueCommandBuilder struct {
    // contains filtered or unexported fields
}

FetchValueCommandBuilder type is required for creating new instances of FetchValueCommand

command, err := NewFetchValueCommandBuilder().
	WithBucketType("myBucketType").
	WithBucket("myBucket").
	WithKey("myKey").
	Build()

func NewFetchValueCommandBuilder Uses

func NewFetchValueCommandBuilder() *FetchValueCommandBuilder

NewFetchValueCommandBuilder is a factory function for generating the command builder struct

func (*FetchValueCommandBuilder) Build Uses

func (builder *FetchValueCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*FetchValueCommandBuilder) WithBasicQuorum Uses

func (builder *FetchValueCommandBuilder) WithBasicQuorum(basicQuorum bool) *FetchValueCommandBuilder

WithBasicQuorum sets basic_quorum, whether to return early in some failure cases (eg. when r=1 and you get 2 errors and a success basic_quorum=true would return an error)

See http://basho.com/posts/technical/riaks-config-behaviors-part-3/

func (*FetchValueCommandBuilder) WithBucket Uses

func (builder *FetchValueCommandBuilder) WithBucket(bucket string) *FetchValueCommandBuilder

WithBucket sets the bucket to be used by the command

func (*FetchValueCommandBuilder) WithBucketType Uses

func (builder *FetchValueCommandBuilder) WithBucketType(bucketType string) *FetchValueCommandBuilder

WithBucketType sets the bucket-type to be used by the command. If omitted, 'default' is used

func (*FetchValueCommandBuilder) WithConflictResolver Uses

func (builder *FetchValueCommandBuilder) WithConflictResolver(resolver ConflictResolver) *FetchValueCommandBuilder

WithConflictResolver builds the command object with a user defined ConflictResolver for handling conflicting key values

func (*FetchValueCommandBuilder) WithHeadOnly Uses

func (builder *FetchValueCommandBuilder) WithHeadOnly(headOnly bool) *FetchValueCommandBuilder

WithHeadOnly returns only the meta data for the value, useful when objects contain large amounts of data

func (*FetchValueCommandBuilder) WithIfModified Uses

func (builder *FetchValueCommandBuilder) WithIfModified(ifModified []byte) *FetchValueCommandBuilder

WithIfModified tells Riak to only return the object if the vclock in Riak differs from what is provided

func (*FetchValueCommandBuilder) WithKey Uses

func (builder *FetchValueCommandBuilder) WithKey(key string) *FetchValueCommandBuilder

WithKey sets the key to be used by the command to read / write values

func (*FetchValueCommandBuilder) WithNVal Uses

func (builder *FetchValueCommandBuilder) WithNVal(nval uint32) *FetchValueCommandBuilder

WithNVal sets the number of times this command operation is replicated in the Cluster. If ommitted, the ring default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*FetchValueCommandBuilder) WithNotFoundOk Uses

func (builder *FetchValueCommandBuilder) WithNotFoundOk(notFoundOk bool) *FetchValueCommandBuilder

WithNotFoundOk sets notfound_ok, whether to treat notfounds as successful reads for the purposes of R

See http://basho.com/posts/technical/riaks-config-behaviors-part-3/

func (*FetchValueCommandBuilder) WithPr Uses

func (builder *FetchValueCommandBuilder) WithPr(pr uint32) *FetchValueCommandBuilder

WithPr sets the number of primary nodes (N) that must be read from in order for the command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*FetchValueCommandBuilder) WithR Uses

func (builder *FetchValueCommandBuilder) WithR(r uint32) *FetchValueCommandBuilder

WithR sets the number of nodes that must report back a successful read in order for the command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*FetchValueCommandBuilder) WithReturnDeletedVClock Uses

func (builder *FetchValueCommandBuilder) WithReturnDeletedVClock(returnDeletedVClock bool) *FetchValueCommandBuilder

WithReturnDeletedVClock sets the command to return a Tombstone if any our found for the key across all of the vnodes

func (*FetchValueCommandBuilder) WithSloppyQuorum Uses

func (builder *FetchValueCommandBuilder) WithSloppyQuorum(sloppyQuorum bool) *FetchValueCommandBuilder

WithSloppyQuorum sets the sloppy_quorum for this Command

See http://docs.basho.com/riak/latest/theory/concepts/Eventual-Consistency/

func (*FetchValueCommandBuilder) WithTimeout Uses

func (builder *FetchValueCommandBuilder) WithTimeout(timeout time.Duration) *FetchValueCommandBuilder

WithTimeout sets a timeout to be used for this command operation

type FetchValueResponse Uses

type FetchValueResponse struct {
    IsNotFound  bool
    IsUnchanged bool
    VClock      []byte
    Values      []*Object
}

FetchValueResponse contains the response data for a FetchValueCommand

type GetServerInfoCommand Uses

type GetServerInfoCommand struct {
    Response *GetServerInfoResponse
    // contains filtered or unexported fields
}

GetServerInfoCommand is used to get Riak server information

func (*GetServerInfoCommand) Error Uses

func (cmd *GetServerInfoCommand) Error() error

func (*GetServerInfoCommand) Name Uses

func (cmd *GetServerInfoCommand) Name() string

Name identifies this command

func (*GetServerInfoCommand) Success Uses

func (cmd *GetServerInfoCommand) Success() bool

type GetServerInfoResponse Uses

type GetServerInfoResponse struct {
    Node          string
    ServerVersion string
}

GetServerInfoResponse contains the response data for Riak server information

type Link struct {
    Bucket string
    Key    string
    Tag    string
}

Link is used to represent a Riak KV object link, which is a one way link to another object within Riak

type ListBucketsCommand Uses

type ListBucketsCommand struct {
    Response *ListBucketsResponse
    // contains filtered or unexported fields
}

ListBucketsCommand is used to list buckets in a bucket type

func (*ListBucketsCommand) Error Uses

func (cmd *ListBucketsCommand) Error() error

func (*ListBucketsCommand) Name Uses

func (cmd *ListBucketsCommand) Name() string

Name identifies this command

func (*ListBucketsCommand) Success Uses

func (cmd *ListBucketsCommand) Success() bool

type ListBucketsCommandBuilder Uses

type ListBucketsCommandBuilder struct {
    // contains filtered or unexported fields
}

ListBucketsCommandBuilder type is required for creating new instances of ListBucketsCommand

cb := func(buckets []string) error {
	// Do something with the result
	return nil
}
cmd, err := NewListBucketsCommandBuilder().
	WithBucketType("myBucketType").
	WithStreaming(true).
	WithCallback(cb).
	Build()

func NewListBucketsCommandBuilder Uses

func NewListBucketsCommandBuilder() *ListBucketsCommandBuilder

NewListBucketsCommandBuilder is a factory function for generating the command builder struct

func (*ListBucketsCommandBuilder) Build Uses

func (builder *ListBucketsCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*ListBucketsCommandBuilder) WithAllowListing Uses

func (builder *ListBucketsCommandBuilder) WithAllowListing() *ListBucketsCommandBuilder

WithAllowListing will allow this command to be built and execute

func (*ListBucketsCommandBuilder) WithBucketType Uses

func (builder *ListBucketsCommandBuilder) WithBucketType(bucketType string) *ListBucketsCommandBuilder

WithBucketType sets the bucket-type to be used by the command. If omitted, 'default' is used

func (*ListBucketsCommandBuilder) WithCallback Uses

func (builder *ListBucketsCommandBuilder) WithCallback(callback func([]string) error) *ListBucketsCommandBuilder

WithCallback sets the callback to be used when handling a streaming response

Requires WithStreaming(true)

func (*ListBucketsCommandBuilder) WithStreaming Uses

func (builder *ListBucketsCommandBuilder) WithStreaming(streaming bool) *ListBucketsCommandBuilder

WithStreaming sets the command to provide a streamed response

If true, a callback must be provided via WithCallback()

func (*ListBucketsCommandBuilder) WithTimeout Uses

func (builder *ListBucketsCommandBuilder) WithTimeout(timeout time.Duration) *ListBucketsCommandBuilder

WithTimeout sets a timeout in milliseconds to be used for this command operation

type ListBucketsResponse Uses

type ListBucketsResponse struct {
    Buckets []string
}

ListBucketsResponse contains the response data for a ListBucketsCommand

type ListKeysCommand Uses

type ListKeysCommand struct {
    Response *ListKeysResponse
    // contains filtered or unexported fields
}

ListKeysCommand is used to fetch a list of keys within a bucket from Riak KV

func (*ListKeysCommand) Error Uses

func (cmd *ListKeysCommand) Error() error

func (*ListKeysCommand) Name Uses

func (cmd *ListKeysCommand) Name() string

Name identifies this command

func (*ListKeysCommand) Success Uses

func (cmd *ListKeysCommand) Success() bool

type ListKeysCommandBuilder Uses

type ListKeysCommandBuilder struct {
    // contains filtered or unexported fields
}

ListKeysCommandBuilder type is required for creating new instances of ListKeysCommand

cb := func(buckets []string) error {
	// Do something with the result
	return nil
}
cmd, err := NewListKeysCommandBuilder().
	WithBucketType("myBucketType").
	WithBucket("myBucket").
	WithStreaming(true).
	WithCallback(cb).
	Build()

func NewListKeysCommandBuilder Uses

func NewListKeysCommandBuilder() *ListKeysCommandBuilder

NewListKeysCommandBuilder is a factory function for generating the command builder struct

func (*ListKeysCommandBuilder) Build Uses

func (builder *ListKeysCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*ListKeysCommandBuilder) WithAllowListing Uses

func (builder *ListKeysCommandBuilder) WithAllowListing() *ListKeysCommandBuilder

WithAllowListing will allow this command to be built and execute

func (*ListKeysCommandBuilder) WithBucket Uses

func (builder *ListKeysCommandBuilder) WithBucket(bucket string) *ListKeysCommandBuilder

WithBucket sets the bucket to be used by the command

func (*ListKeysCommandBuilder) WithBucketType Uses

func (builder *ListKeysCommandBuilder) WithBucketType(bucketType string) *ListKeysCommandBuilder

WithBucketType sets the bucket-type to be used by the command. If omitted, 'default' is used

func (*ListKeysCommandBuilder) WithCallback Uses

func (builder *ListKeysCommandBuilder) WithCallback(callback func([]string) error) *ListKeysCommandBuilder

WithCallback sets the callback to be used when handling a streaming response

Requires WithStreaming(true)

func (*ListKeysCommandBuilder) WithStreaming Uses

func (builder *ListKeysCommandBuilder) WithStreaming(streaming bool) *ListKeysCommandBuilder

WithStreaming sets the command to provide a streamed response

If true, a callback must be provided via WithCallback()

func (*ListKeysCommandBuilder) WithTimeout Uses

func (builder *ListKeysCommandBuilder) WithTimeout(timeout time.Duration) *ListKeysCommandBuilder

WithTimeout sets a timeout to be used for this command operation

type ListKeysResponse Uses

type ListKeysResponse struct {
    Keys []string
}

ListKeysResponse contains the response data for a ListKeysCommand

type Map Uses

type Map struct {
    Counters  map[string]int64
    Sets      map[string][][]byte
    Registers map[string][]byte
    Flags     map[string]bool
    Maps      map[string]*Map
}

Map object represents the Riak Map object and is returned within the Response objects for both UpdateMapCommand and FetchMapCommand

type MapOperation Uses

type MapOperation struct {
    // contains filtered or unexported fields
}

MapOperation contains the instructions to send to Riak what updates to the Map you want to complete

func (*MapOperation) AddToSet Uses

func (mapOp *MapOperation) AddToSet(key string, value []byte) *MapOperation

AddToSet adds an element to the child set CRDT of the map at the specified key

func (*MapOperation) IncrementCounter Uses

func (mapOp *MapOperation) IncrementCounter(key string, increment int64) *MapOperation

IncrementCounter increments a child counter CRDT of the map at the specified key

func (*MapOperation) Map Uses

func (mapOp *MapOperation) Map(key string) *MapOperation

Map returns a nested map operation for manipulation

func (*MapOperation) RemoveCounter Uses

func (mapOp *MapOperation) RemoveCounter(key string) *MapOperation

RemoveCounter removes a child counter CRDT from the map at the specified key

func (*MapOperation) RemoveFlag Uses

func (mapOp *MapOperation) RemoveFlag(key string) *MapOperation

RemoveFlag removes a flag CRDT from the map

func (*MapOperation) RemoveFromSet Uses

func (mapOp *MapOperation) RemoveFromSet(key string, value []byte) *MapOperation

RemoveFromSet removes elements from the child set CRDT of the map at the specified key

func (*MapOperation) RemoveMap Uses

func (mapOp *MapOperation) RemoveMap(key string) *MapOperation

RemoveMap removes a nested map from the map

func (*MapOperation) RemoveRegister Uses

func (mapOp *MapOperation) RemoveRegister(key string) *MapOperation

RemoveRegister removes a register CRDT from the map

func (*MapOperation) RemoveSet Uses

func (mapOp *MapOperation) RemoveSet(key string) *MapOperation

RemoveSet removes the child set CRDT from the map

func (*MapOperation) SetFlag Uses

func (mapOp *MapOperation) SetFlag(key string, value bool) *MapOperation

SetFlag sets a flag CRDT on the map

func (*MapOperation) SetRegister Uses

func (mapOp *MapOperation) SetRegister(key string, value []byte) *MapOperation

SetRegister sets a register CRDT on the map with the provided value

type MapReduceCommand Uses

type MapReduceCommand struct {
    Response [][]byte
    // contains filtered or unexported fields
}

MapReduceCommand is used to fetch keys or data from Riak KV using the MapReduce technique

func (*MapReduceCommand) Error Uses

func (cmd *MapReduceCommand) Error() error

func (*MapReduceCommand) Name Uses

func (cmd *MapReduceCommand) Name() string

Name identifies this command

func (*MapReduceCommand) Success Uses

func (cmd *MapReduceCommand) Success() bool

type MapReduceCommandBuilder Uses

type MapReduceCommandBuilder struct {
    // contains filtered or unexported fields
}

MapReduceCommandBuilder type is required for creating new instances of MapReduceCommand

command, err := NewMapReduceCommandBuilder().
	WithQuery("myMapReduceQuery").
	Build()

func NewMapReduceCommandBuilder Uses

func NewMapReduceCommandBuilder() *MapReduceCommandBuilder

NewMapReduceCommandBuilder is a factory function for generating the command builder struct

func (*MapReduceCommandBuilder) Build Uses

func (builder *MapReduceCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*MapReduceCommandBuilder) WithCallback Uses

func (builder *MapReduceCommandBuilder) WithCallback(callback func([]byte) error) *MapReduceCommandBuilder

WithCallback sets the callback to be used when handling a streaming response

Requires WithStreaming(true)

func (*MapReduceCommandBuilder) WithQuery Uses

func (builder *MapReduceCommandBuilder) WithQuery(query string) *MapReduceCommandBuilder

WithQuery sets the map reduce query to be executed on Riak

func (*MapReduceCommandBuilder) WithStreaming Uses

func (builder *MapReduceCommandBuilder) WithStreaming(streaming bool) *MapReduceCommandBuilder

WithStreaming sets the command to provide a streamed response

If true, a callback must be provided via WithCallback()

type ModFun Uses

type ModFun struct {
    Module   string
    Function string
}

ModFun is used when fetching or updating LinkFun or ChashKeyfun bucket properties on Riak

type NewClientOptions Uses

type NewClientOptions struct {
    Cluster         *Cluster
    Port            uint16   // NB: if specified, all connections will use this value if port is not provided
    RemoteAddresses []string // NB: in the form HOST|IP[:PORT]
}

Options for creating a new Client. Either Cluster or Port/RemoteAddress information must be provided

type Node Uses

type Node struct {
    // contains filtered or unexported fields
}

Node is a struct that contains all of the information needed to connect and maintain connections with a Riak KV instance

func NewNode Uses

func NewNode(options *NodeOptions) (*Node, error)

NewNode is a factory function that takes a NodeOptions struct and returns a Node struct

func (*Node) String Uses

func (n *Node) String() string

String returns a formatted string including the remoteAddress for the Node and its current connection count

type NodeManager Uses

type NodeManager interface {
    ExecuteOnNode(nodes []*Node, command Command, previousNode *Node) (bool, error)
}

NodeManager enforces the structure needed to if going to implement your own NodeManager

type NodeOptions Uses

type NodeOptions struct {
    RemoteAddress       string
    MinConnections      uint16
    MaxConnections      uint16
    TempNetErrorRetries uint16
    IdleTimeout         time.Duration
    ConnectTimeout      time.Duration
    RequestTimeout      time.Duration
    HealthCheckInterval time.Duration
    HealthCheckBuilder  CommandBuilder
    AuthOptions         *AuthOptions
}

NodeOptions defines the RemoteAddress and operational configuration for connections to a Riak KV instance

type Object Uses

type Object struct {
    BucketType      string
    Bucket          string
    Key             string
    IsTombstone     bool
    Value           []byte
    ContentType     string
    Charset         string
    ContentEncoding string
    VTag            string
    LastModified    time.Time
    UserMeta        []*Pair
    Indexes         map[string][]string
    Links           []*Link
    VClock          []byte
}

Object structure used for representing a KV Riak object

func (*Object) AddToIndex Uses

func (o *Object) AddToIndex(indexName string, indexValue string)

AddToIndex adds the object to the specified secondary index with the string value to be used for index searches

func (*Object) AddToIntIndex Uses

func (o *Object) AddToIntIndex(indexName string, indexValue int)

AddToIntIndex adds the object to the specified secondary index with the integer value to be used for index searches

func (*Object) HasIndexes Uses

func (o *Object) HasIndexes() bool

HasIndexes is a bool check to determine if the object contains any secondary indexes for searching

func (o *Object) HasLinks() bool

HasLinks is a bool check to determine if the object contains any links

func (*Object) HasUserMeta Uses

func (o *Object) HasUserMeta() bool

HasUserMeta is a bool check to determine if the object contains any user defined meta data

type Pair Uses

type Pair struct {
    Key   string
    Value string
}

Pair is used to store user defined meta data with a key and value

type PingCommand Uses

type PingCommand struct {
    // contains filtered or unexported fields
}

PingCommand is used to verify Riak is online and reachable

func (*PingCommand) Error Uses

func (cmd *PingCommand) Error() error

func (*PingCommand) Name Uses

func (cmd *PingCommand) Name() string

Name identifies this command

func (*PingCommand) Success Uses

func (cmd *PingCommand) Success() bool

type PingCommandBuilder Uses

type PingCommandBuilder struct {
}

PingCommandBuilder is the command builder required for PingCommand

func (*PingCommandBuilder) Build Uses

func (builder *PingCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

type PreflistItem Uses

type PreflistItem struct {
    Partition int64
    Node      string
    Primary   bool
}

PreflistItem represents an individual result from the FetchPreflistResponse result set

type ReplMode Uses

type ReplMode int32

ReplMode contains the replication mode

const (
    FALSE    ReplMode = 0
    REALTIME ReplMode = 1
    FULLSYNC ReplMode = 2
    TRUE     ReplMode = 3
)

Convenience constants for maintaining the replication mode

type ResetBucketCommand Uses

type ResetBucketCommand struct {
    // contains filtered or unexported fields
}

ResetBucketCommand is used to reset the properties of a given bucket or bucket type

func (*ResetBucketCommand) Error Uses

func (cmd *ResetBucketCommand) Error() error

func (*ResetBucketCommand) Name Uses

func (cmd *ResetBucketCommand) Name() string

Name identifies this command

func (*ResetBucketCommand) Success Uses

func (cmd *ResetBucketCommand) Success() bool

type ResetBucketCommandBuilder Uses

type ResetBucketCommandBuilder struct {
    // contains filtered or unexported fields
}

ResetBucketCommandBuilder is the command builder for ResetBucketCommand

func NewResetBucketCommandBuilder Uses

func NewResetBucketCommandBuilder() *ResetBucketCommandBuilder

NewResetBucketCommandBuilder is a factory function for generating the command builder struct

func (*ResetBucketCommandBuilder) Build Uses

func (builder *ResetBucketCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*ResetBucketCommandBuilder) WithBucket Uses

func (builder *ResetBucketCommandBuilder) WithBucket(bucket string) *ResetBucketCommandBuilder

WithBucket sets the bucket to be used by the command

func (*ResetBucketCommandBuilder) WithBucketType Uses

func (builder *ResetBucketCommandBuilder) WithBucketType(bucketType string) *ResetBucketCommandBuilder

WithBucketType sets the bucket-type to be used by the command. If omitted, 'default' is used

type RiakError Uses

type RiakError struct {
    Errcode uint32
    Errmsg  string
}

func (RiakError) Error Uses

func (e RiakError) Error() (s string)

type Schema Uses

type Schema struct {
    Name    string
    Content string
}

Schema object representing the solr schema that is returned from Riak

type SearchCommand Uses

type SearchCommand struct {
    Response *SearchResponse
    // contains filtered or unexported fields
}

SearchCommand is used to search Riak for values using search indexes & schemas

func (*SearchCommand) Error Uses

func (cmd *SearchCommand) Error() error

func (*SearchCommand) Name Uses

func (cmd *SearchCommand) Name() string

Name identifies this command

func (*SearchCommand) Success Uses

func (cmd *SearchCommand) Success() bool

type SearchCommandBuilder Uses

type SearchCommandBuilder struct {
    // contains filtered or unexported fields
}

SearchCommandBuilder type is required for creating new instances of SearchCommand

command, err := NewSearchCommandBuilder().
	WithIndexName("myIndexName").
	WithQuery("mySolrQuery").
	WithNumRows(100).
	Build()

func NewSearchCommandBuilder Uses

func NewSearchCommandBuilder() *SearchCommandBuilder

NewSearchCommandBuilder is a factory function for generating the command builder struct

func (*SearchCommandBuilder) Build Uses

func (builder *SearchCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*SearchCommandBuilder) WithDefaultField Uses

func (builder *SearchCommandBuilder) WithDefaultField(defaultField string) *SearchCommandBuilder

WithDefaultField sets the default field to be used by Riak the search query

See https://wiki.apache.org/solr/SolrQuerySyntax

func (*SearchCommandBuilder) WithDefaultOperation Uses

func (builder *SearchCommandBuilder) WithDefaultOperation(op string) *SearchCommandBuilder

WithDefaultOperation sets the default operation to be used by Riak for the search query

See https://wiki.apache.org/solr/SolrQuerySyntax

func (*SearchCommandBuilder) WithFilterQuery Uses

func (builder *SearchCommandBuilder) WithFilterQuery(filterQuery string) *SearchCommandBuilder

WithFilterQuery sets the solr filter query to be used, the main query runs first, the filter query reduces the scope of the result set even further

func (*SearchCommandBuilder) WithIndexName Uses

func (builder *SearchCommandBuilder) WithIndexName(index string) *SearchCommandBuilder

WithIndexName sets the index to use for the command

func (*SearchCommandBuilder) WithNumRows Uses

func (builder *SearchCommandBuilder) WithNumRows(numRows uint32) *SearchCommandBuilder

WithNumRows sets the number of documents to be returned by Riak

func (*SearchCommandBuilder) WithPresort Uses

func (builder *SearchCommandBuilder) WithPresort(presort string) *SearchCommandBuilder

WithPresort allows you to configure Riak to presort the result set by Key or Score

func (*SearchCommandBuilder) WithQuery Uses

func (builder *SearchCommandBuilder) WithQuery(query string) *SearchCommandBuilder

WithQuery sets the solr query to be executed on Riak

func (*SearchCommandBuilder) WithReturnFields Uses

func (builder *SearchCommandBuilder) WithReturnFields(fields ...string) *SearchCommandBuilder

WithReturnFields sets the fields to be returned within each document

func (*SearchCommandBuilder) WithSortField Uses

func (builder *SearchCommandBuilder) WithSortField(sortField string) *SearchCommandBuilder

WithSortField defines which field should be used for sorting the result set

func (*SearchCommandBuilder) WithStart Uses

func (builder *SearchCommandBuilder) WithStart(start uint32) *SearchCommandBuilder

WithStart sets the document to start the result set with

type SearchDoc Uses

type SearchDoc struct {
    BucketType string
    Bucket     string
    Key        string
    Id         string
    Score      string
    Fields     map[string][]string
}

SearchDoc object representing solr document returned from Riak

type SearchIndex Uses

type SearchIndex struct {
    Name   string
    Schema string
    NVal   uint32
}

SearchIndex object representing the solr index that is returned from Riak

type SearchResponse Uses

type SearchResponse struct {
    Docs     []*SearchDoc
    MaxScore float32
    NumFound uint32
}

SearchResponse contains the response data for a SearchCommand

type SecondaryIndexQueryCommand Uses

type SecondaryIndexQueryCommand struct {
    Response *SecondaryIndexQueryResponse
    // contains filtered or unexported fields
}

SecondaryIndexQueryCommand is used to query for keys from Riak KV using secondary indexes

func (*SecondaryIndexQueryCommand) Error Uses

func (cmd *SecondaryIndexQueryCommand) Error() error

func (*SecondaryIndexQueryCommand) Name Uses

func (cmd *SecondaryIndexQueryCommand) Name() string

Name identifies this command

func (*SecondaryIndexQueryCommand) Success Uses

func (cmd *SecondaryIndexQueryCommand) Success() bool

type SecondaryIndexQueryCommandBuilder Uses

type SecondaryIndexQueryCommandBuilder struct {
    // contains filtered or unexported fields
}

SecondaryIndexQueryCommandBuilder type is required for creating new instances of SecondaryIndexQueryCommand

command, err := NewSecondaryIndexQueryCommandBuilder().
	WithBucketType("myBucketType").
	WithBucket("myBucket").
	WithIndexName("myIndexName").
	WithIndexKey("myIndexKey").
	WithIntIndexKey(1234).
	Build()

func NewSecondaryIndexQueryCommandBuilder Uses

func NewSecondaryIndexQueryCommandBuilder() *SecondaryIndexQueryCommandBuilder

NewSecondaryIndexQueryCommandBuilder is a factory function for generating the command builder struct

func (*SecondaryIndexQueryCommandBuilder) Build Uses

func (builder *SecondaryIndexQueryCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*SecondaryIndexQueryCommandBuilder) WithBucket Uses

func (builder *SecondaryIndexQueryCommandBuilder) WithBucket(bucket string) *SecondaryIndexQueryCommandBuilder

WithBucket sets the bucket to be used by the command

func (*SecondaryIndexQueryCommandBuilder) WithBucketType Uses

func (builder *SecondaryIndexQueryCommandBuilder) WithBucketType(bucketType string) *SecondaryIndexQueryCommandBuilder

WithBucketType sets the bucket-type to be used by the command. If omitted, 'default' is used

func (*SecondaryIndexQueryCommandBuilder) WithCallback Uses

func (builder *SecondaryIndexQueryCommandBuilder) WithCallback(callback func([]*SecondaryIndexQueryResult) error) *SecondaryIndexQueryCommandBuilder

WithCallback sets the callback to be used when handling a streaming response

Requires WithStreaming(true)

func (*SecondaryIndexQueryCommandBuilder) WithContinuation Uses

func (builder *SecondaryIndexQueryCommandBuilder) WithContinuation(cont []byte) *SecondaryIndexQueryCommandBuilder

WithContinuation sets the position at which the result set should continue from, value can be found within the result set of the previous page for the same query

func (*SecondaryIndexQueryCommandBuilder) WithIndexKey Uses

func (builder *SecondaryIndexQueryCommandBuilder) WithIndexKey(key string) *SecondaryIndexQueryCommandBuilder

WithIndexKey defines the index to search against

func (*SecondaryIndexQueryCommandBuilder) WithIndexName Uses

func (builder *SecondaryIndexQueryCommandBuilder) WithIndexName(indexName string) *SecondaryIndexQueryCommandBuilder

WithIndexName sets the index to use for the command

func (*SecondaryIndexQueryCommandBuilder) WithIntIndexKey Uses

func (builder *SecondaryIndexQueryCommandBuilder) WithIntIndexKey(key int) *SecondaryIndexQueryCommandBuilder

WithIntIndexKey defines the integer index to search against

func (*SecondaryIndexQueryCommandBuilder) WithIntRange Uses

func (builder *SecondaryIndexQueryCommandBuilder) WithIntRange(min int64, max int64) *SecondaryIndexQueryCommandBuilder

WithIntRange sets the range of integer type index values to return, useful when you want 1,3,5,11 and not 1,11,3,5

func (*SecondaryIndexQueryCommandBuilder) WithMaxResults Uses

func (builder *SecondaryIndexQueryCommandBuilder) WithMaxResults(maxResults uint32) *SecondaryIndexQueryCommandBuilder

WithMaxResults sets the maximum number of values to return in the result set

func (*SecondaryIndexQueryCommandBuilder) WithPaginationSort Uses

func (builder *SecondaryIndexQueryCommandBuilder) WithPaginationSort(paginationSort bool) *SecondaryIndexQueryCommandBuilder

WithPaginationSort set to true, the results of a non-paginated query will return sorted from Riak

func (*SecondaryIndexQueryCommandBuilder) WithRange Uses

func (builder *SecondaryIndexQueryCommandBuilder) WithRange(min string, max string) *SecondaryIndexQueryCommandBuilder

WithRange sets the range of index values to return

func (*SecondaryIndexQueryCommandBuilder) WithReturnKeyAndIndex Uses

func (builder *SecondaryIndexQueryCommandBuilder) WithReturnKeyAndIndex(val bool) *SecondaryIndexQueryCommandBuilder

WithReturnKeyAndIndex set to true, the result set will include both index keys and object keys

func (*SecondaryIndexQueryCommandBuilder) WithStreaming Uses

func (builder *SecondaryIndexQueryCommandBuilder) WithStreaming(streaming bool) *SecondaryIndexQueryCommandBuilder

WithStreaming sets the command to provide a streamed response

If true, a callback must be provided via WithCallback()

func (*SecondaryIndexQueryCommandBuilder) WithTermRegex Uses

func (builder *SecondaryIndexQueryCommandBuilder) WithTermRegex(regex string) *SecondaryIndexQueryCommandBuilder

WithTermRegex sets the regex pattern to filter the result set by

func (*SecondaryIndexQueryCommandBuilder) WithTimeout Uses

func (builder *SecondaryIndexQueryCommandBuilder) WithTimeout(timeout time.Duration) *SecondaryIndexQueryCommandBuilder

WithTimeout sets a timeout to be used for this command operation

type SecondaryIndexQueryResponse Uses

type SecondaryIndexQueryResponse struct {
    Results      []*SecondaryIndexQueryResult
    Continuation []byte
}

SecondaryIndexQueryResponse contains the response data for a SecondaryIndexQueryCommand

type SecondaryIndexQueryResult Uses

type SecondaryIndexQueryResult struct {
    IndexKey  []byte
    ObjectKey []byte
}

SecondaryIndexQueryResult represents an individual result of the SecondaryIndexQueryResponse result set

type StoreBucketPropsCommand Uses

type StoreBucketPropsCommand struct {
    // contains filtered or unexported fields
}

StoreBucketPropsCommand is used to store changes to a buckets properties

func (*StoreBucketPropsCommand) Error Uses

func (cmd *StoreBucketPropsCommand) Error() error

func (*StoreBucketPropsCommand) Name Uses

func (cmd *StoreBucketPropsCommand) Name() string

Name identifies this command

func (*StoreBucketPropsCommand) Success Uses

func (cmd *StoreBucketPropsCommand) Success() bool

type StoreBucketPropsCommandBuilder Uses

type StoreBucketPropsCommandBuilder struct {
    // contains filtered or unexported fields
}

StoreBucketPropsCommandBuilder type is required for creating new instances of StoreBucketPropsCommand

command := NewStoreBucketPropsCommandBuilder().
	WithBucketType("myBucketType").
	WithBucket("myBucket").
	WithAllowMult(true).
	Build()

func NewStoreBucketPropsCommandBuilder Uses

func NewStoreBucketPropsCommandBuilder() *StoreBucketPropsCommandBuilder

NewStoreBucketPropsCommandBuilder is a factory function for generating the command builder struct

func (*StoreBucketPropsCommandBuilder) AddPostCommit Uses

func (builder *StoreBucketPropsCommandBuilder) AddPostCommit(commitHook *CommitHook) *StoreBucketPropsCommandBuilder

AddPostCommit allows you to attach a postcommit hook to the bucket

See http://docs.basho.com/riak/latest/dev/using/commit-hooks/

func (*StoreBucketPropsCommandBuilder) AddPreCommit Uses

func (builder *StoreBucketPropsCommandBuilder) AddPreCommit(commitHook *CommitHook) *StoreBucketPropsCommandBuilder

AddPreCommit allows you to attach a precommit hook to the bucket

See http://docs.basho.com/riak/latest/dev/using/commit-hooks/

func (*StoreBucketPropsCommandBuilder) Build Uses

func (builder *StoreBucketPropsCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*StoreBucketPropsCommandBuilder) WithAllowMult Uses

func (builder *StoreBucketPropsCommandBuilder) WithAllowMult(allowMult bool) *StoreBucketPropsCommandBuilder

WithAllowMult sets whether or not to allow Riak to store siblings of an object when writes conflict

func (*StoreBucketPropsCommandBuilder) WithBackend Uses

func (builder *StoreBucketPropsCommandBuilder) WithBackend(backend string) *StoreBucketPropsCommandBuilder

WithBackend sets the backend to be used for this bucket

func (*StoreBucketPropsCommandBuilder) WithBasicQuorum Uses

func (builder *StoreBucketPropsCommandBuilder) WithBasicQuorum(basicQuorum bool) *StoreBucketPropsCommandBuilder

WithBasicQuorum sets basic_quorum, whether to return early in some failure cases (eg. when r=1 and you get 2 errors and a success basic_quorum=true would return an error)

See http://basho.com/posts/technical/riaks-config-behaviors-part-3/

func (*StoreBucketPropsCommandBuilder) WithBigVClock Uses

func (builder *StoreBucketPropsCommandBuilder) WithBigVClock(bigVClock uint32) *StoreBucketPropsCommandBuilder

WithBigVClock sets the big_vclock value representing an epoch time value

func (*StoreBucketPropsCommandBuilder) WithBucket Uses

func (builder *StoreBucketPropsCommandBuilder) WithBucket(bucket string) *StoreBucketPropsCommandBuilder

WithBucket sets the bucket to be used by the command

func (*StoreBucketPropsCommandBuilder) WithBucketType Uses

func (builder *StoreBucketPropsCommandBuilder) WithBucketType(bucketType string) *StoreBucketPropsCommandBuilder

WithBucketType sets the bucket-type to be used by the command. If omitted, 'default' is used

func (*StoreBucketPropsCommandBuilder) WithChashKeyFun Uses

func (builder *StoreBucketPropsCommandBuilder) WithChashKeyFun(val *ModFun) *StoreBucketPropsCommandBuilder

WithChashKeyFun sets the chash_keyfun property on the bucket which allows custom hashing functions Please note, this is an advanced feature, only use with caution

func (*StoreBucketPropsCommandBuilder) WithDw Uses

func (builder *StoreBucketPropsCommandBuilder) WithDw(dw uint32) *StoreBucketPropsCommandBuilder

WithDw (durable writes) sets the number of nodes that must report back a successful write to backend storage in order for the command operation to be considered a success by Riak. If omitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*StoreBucketPropsCommandBuilder) WithHllPrecision Uses

func (builder *StoreBucketPropsCommandBuilder) WithHllPrecision(precision uint32) *StoreBucketPropsCommandBuilder

WithHllPrecision sets the number of bits to use in the Hyperloglog data type precision. Valid values are [4 - 16] inclusive, default is 14 on new buckets. NOTE: When changing precision, it may only be reduced from it's current value, and never increased.

func (*StoreBucketPropsCommandBuilder) WithLastWriteWins Uses

func (builder *StoreBucketPropsCommandBuilder) WithLastWriteWins(lww bool) *StoreBucketPropsCommandBuilder

WithLastWriteWins sets whether Riak should resolve conflicts using timestamp (most recent wins)

func (*StoreBucketPropsCommandBuilder) WithNVal Uses

func (builder *StoreBucketPropsCommandBuilder) WithNVal(nval uint32) *StoreBucketPropsCommandBuilder

WithNVal sets the number of times this command operation is replicated in the Cluster. If omitted, the ring default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*StoreBucketPropsCommandBuilder) WithNotFoundOk Uses

func (builder *StoreBucketPropsCommandBuilder) WithNotFoundOk(notFoundOk bool) *StoreBucketPropsCommandBuilder

WithNotFoundOk sets notfound_ok, whether to treat notfounds as successful reads for the purposes of R

See http://basho.com/posts/technical/riaks-config-behaviors-part-3/

func (*StoreBucketPropsCommandBuilder) WithOldVClock Uses

func (builder *StoreBucketPropsCommandBuilder) WithOldVClock(oldVClock uint32) *StoreBucketPropsCommandBuilder

WithOldVClock sets the old_vclock value representing an epoch time value

func (*StoreBucketPropsCommandBuilder) WithPr Uses

func (builder *StoreBucketPropsCommandBuilder) WithPr(pr uint32) *StoreBucketPropsCommandBuilder

WithPr sets the number of primary nodes (N) that must be read from in order for the command operation to be considered a success by Riak.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*StoreBucketPropsCommandBuilder) WithPw Uses

func (builder *StoreBucketPropsCommandBuilder) WithPw(pw uint32) *StoreBucketPropsCommandBuilder

WithPw sets the number of primary nodes (N) that must report back a successful write in order for the command operation to be considered a success by Riak.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*StoreBucketPropsCommandBuilder) WithR Uses

func (builder *StoreBucketPropsCommandBuilder) WithR(r uint32) *StoreBucketPropsCommandBuilder

WithR sets the number of nodes that must report back a successful read in order for the command operation to be considered a success by Riak.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*StoreBucketPropsCommandBuilder) WithRw Uses

func (builder *StoreBucketPropsCommandBuilder) WithRw(rw uint32) *StoreBucketPropsCommandBuilder

WithRw (delete quorum) sets the number of nodes that must report back a successful delete to backend storage in order for the command operation to be considered a success by Riak. It represents the read and write operations that are completed internal to Riak to complete a delete.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*StoreBucketPropsCommandBuilder) WithSearch Uses

func (builder *StoreBucketPropsCommandBuilder) WithSearch(search bool) *StoreBucketPropsCommandBuilder

WithSearch enables / disables search features for this bucket

func (*StoreBucketPropsCommandBuilder) WithSearchIndex Uses

func (builder *StoreBucketPropsCommandBuilder) WithSearchIndex(searchIndex string) *StoreBucketPropsCommandBuilder

WithSearchIndex sets a searchIndex to be used on the bucket

func (*StoreBucketPropsCommandBuilder) WithSmallVClock Uses

func (builder *StoreBucketPropsCommandBuilder) WithSmallVClock(smallVClock uint32) *StoreBucketPropsCommandBuilder

WithSmallVClock sets the old_vclock value representing an epoch time value

func (*StoreBucketPropsCommandBuilder) WithW Uses

func (builder *StoreBucketPropsCommandBuilder) WithW(w uint32) *StoreBucketPropsCommandBuilder

WithW sets the number of nodes that must report back a successful write in order for the command operation to be considered a success by Riak.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*StoreBucketPropsCommandBuilder) WithYoungVClock Uses

func (builder *StoreBucketPropsCommandBuilder) WithYoungVClock(youngVClock uint32) *StoreBucketPropsCommandBuilder

WithYoungVClock sets the old_vclock value representing an epoch time value

type StoreBucketTypePropsCommand Uses

type StoreBucketTypePropsCommand struct {
    // contains filtered or unexported fields
}

StoreBucketTypePropsCommand is used to store changes to a bucket type's properties

func (*StoreBucketTypePropsCommand) Error Uses

func (cmd *StoreBucketTypePropsCommand) Error() error

func (*StoreBucketTypePropsCommand) Name Uses

func (cmd *StoreBucketTypePropsCommand) Name() string

Name identifies this command

func (*StoreBucketTypePropsCommand) Success Uses

func (cmd *StoreBucketTypePropsCommand) Success() bool

type StoreBucketTypePropsCommandBuilder Uses

type StoreBucketTypePropsCommandBuilder struct {
    // contains filtered or unexported fields
}

StoreBucketTypePropsCommandBuilder type is required for creating new instances of StoreBucketTypePropsCommand

command, err := NewStoreBucketTypePropsCommandBuilder().
	WithBucketType("myBucketType").
	WithAllowMult(true).
	Build()

func NewStoreBucketTypePropsCommandBuilder Uses

func NewStoreBucketTypePropsCommandBuilder() *StoreBucketTypePropsCommandBuilder

NewStoreBucketTypePropsCommandBuilder is a factory function for generating the command builder struct

func (*StoreBucketTypePropsCommandBuilder) AddPostCommit Uses

func (builder *StoreBucketTypePropsCommandBuilder) AddPostCommit(commitHook *CommitHook) *StoreBucketTypePropsCommandBuilder

AddPostCommit allows you to attach a postcommit hook to the bucket

See http://docs.basho.com/riak/latest/dev/using/commit-hooks/

func (*StoreBucketTypePropsCommandBuilder) AddPreCommit Uses

func (builder *StoreBucketTypePropsCommandBuilder) AddPreCommit(commitHook *CommitHook) *StoreBucketTypePropsCommandBuilder

AddPreCommit allows you to attach a precommit hook to the bucket

See http://docs.basho.com/riak/latest/dev/using/commit-hooks/

func (*StoreBucketTypePropsCommandBuilder) Build Uses

func (builder *StoreBucketTypePropsCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*StoreBucketTypePropsCommandBuilder) WithAllowMult Uses

func (builder *StoreBucketTypePropsCommandBuilder) WithAllowMult(allowMult bool) *StoreBucketTypePropsCommandBuilder

WithAllowMult sets whether or not to allow Riak to store siblings of an object when writes conflict

func (*StoreBucketTypePropsCommandBuilder) WithBackend Uses

func (builder *StoreBucketTypePropsCommandBuilder) WithBackend(backend string) *StoreBucketTypePropsCommandBuilder

WithBackend sets the backend to be used for this bucket

func (*StoreBucketTypePropsCommandBuilder) WithBasicQuorum Uses

func (builder *StoreBucketTypePropsCommandBuilder) WithBasicQuorum(basicQuorum bool) *StoreBucketTypePropsCommandBuilder

WithBasicQuorum sets basic_quorum, whether to return early in some failure cases (eg. when r=1 and you get 2 errors and a success basic_quorum=true would return an error)

See http://basho.com/posts/technical/riaks-config-behaviors-part-3/

func (*StoreBucketTypePropsCommandBuilder) WithBigVClock Uses

func (builder *StoreBucketTypePropsCommandBuilder) WithBigVClock(bigVClock uint32) *StoreBucketTypePropsCommandBuilder

WithBigVClock sets the big_vclock value representing an epoch time value

func (*StoreBucketTypePropsCommandBuilder) WithBucketType Uses

func (builder *StoreBucketTypePropsCommandBuilder) WithBucketType(bucketType string) *StoreBucketTypePropsCommandBuilder

WithBucketType sets the bucket-type to be used by the command. If omitted, 'default' is used

func (*StoreBucketTypePropsCommandBuilder) WithChashKeyFun Uses

func (builder *StoreBucketTypePropsCommandBuilder) WithChashKeyFun(val *ModFun) *StoreBucketTypePropsCommandBuilder

WithChashKeyFun sets the chash_keyfun property on the bucket which allows custom hashing functions Please note, this is an advanced feature, only use with caution

func (*StoreBucketTypePropsCommandBuilder) WithDw Uses

func (builder *StoreBucketTypePropsCommandBuilder) WithDw(dw uint32) *StoreBucketTypePropsCommandBuilder

WithDw (durable writes) sets the number of nodes that must report back a successful write to backend storage in order for the command operation to be considered a success by Riak. If omitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*StoreBucketTypePropsCommandBuilder) WithHllPrecision Uses

func (builder *StoreBucketTypePropsCommandBuilder) WithHllPrecision(precision uint32) *StoreBucketTypePropsCommandBuilder

WithHllPrecision sets the number of bits to use in the Hyperloglog data type precision. Valid values are [4 - 16] inclusive, default is 14 on new buckets. NOTE: When changing precision, it may only be reduced from it's current value, and never increased.

func (*StoreBucketTypePropsCommandBuilder) WithLastWriteWins Uses

func (builder *StoreBucketTypePropsCommandBuilder) WithLastWriteWins(lww bool) *StoreBucketTypePropsCommandBuilder

WithLastWriteWins sets whether Riak should resolve conflicts using timestamp (most recent wins)

func (*StoreBucketTypePropsCommandBuilder) WithNVal Uses

func (builder *StoreBucketTypePropsCommandBuilder) WithNVal(nval uint32) *StoreBucketTypePropsCommandBuilder

WithNVal sets the number of times this command operation is replicated in the Cluster. If omitted, the ring default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*StoreBucketTypePropsCommandBuilder) WithNotFoundOk Uses

func (builder *StoreBucketTypePropsCommandBuilder) WithNotFoundOk(notFoundOk bool) *StoreBucketTypePropsCommandBuilder

WithNotFoundOk sets notfound_ok, whether to treat notfounds as successful reads for the purposes of R

See http://basho.com/posts/technical/riaks-config-behaviors-part-3/

func (*StoreBucketTypePropsCommandBuilder) WithOldVClock Uses

func (builder *StoreBucketTypePropsCommandBuilder) WithOldVClock(oldVClock uint32) *StoreBucketTypePropsCommandBuilder

WithOldVClock sets the old_vclock value representing an epoch time value

func (*StoreBucketTypePropsCommandBuilder) WithPr Uses

func (builder *StoreBucketTypePropsCommandBuilder) WithPr(pr uint32) *StoreBucketTypePropsCommandBuilder

WithPr sets the number of primary nodes (N) that must be read from in order for the command operation to be considered a success by Riak.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*StoreBucketTypePropsCommandBuilder) WithPw Uses

func (builder *StoreBucketTypePropsCommandBuilder) WithPw(pw uint32) *StoreBucketTypePropsCommandBuilder

WithPw sets the number of primary nodes (N) that must report back a successful write in order for the command operation to be considered a success by Riak.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*StoreBucketTypePropsCommandBuilder) WithR Uses

func (builder *StoreBucketTypePropsCommandBuilder) WithR(r uint32) *StoreBucketTypePropsCommandBuilder

WithR sets the number of nodes that must report back a successful read in order for the command operation to be considered a success by Riak.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*StoreBucketTypePropsCommandBuilder) WithRw Uses

func (builder *StoreBucketTypePropsCommandBuilder) WithRw(rw uint32) *StoreBucketTypePropsCommandBuilder

WithRw (delete quorum) sets the number of nodes that must report back a successful delete to backend storage in order for the command operation to be considered a success by Riak. It represents the read and write operations that are completed internal to Riak to complete a delete.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*StoreBucketTypePropsCommandBuilder) WithSearch Uses

func (builder *StoreBucketTypePropsCommandBuilder) WithSearch(search bool) *StoreBucketTypePropsCommandBuilder

WithSearch enables / disables search features for this bucket

func (*StoreBucketTypePropsCommandBuilder) WithSearchIndex Uses

func (builder *StoreBucketTypePropsCommandBuilder) WithSearchIndex(searchIndex string) *StoreBucketTypePropsCommandBuilder

WithSearchIndex sets a searchIndex to be used on the bucket

func (*StoreBucketTypePropsCommandBuilder) WithSmallVClock Uses

func (builder *StoreBucketTypePropsCommandBuilder) WithSmallVClock(smallVClock uint32) *StoreBucketTypePropsCommandBuilder

WithSmallVClock sets the old_vclock value representing an epoch time value

func (*StoreBucketTypePropsCommandBuilder) WithW Uses

func (builder *StoreBucketTypePropsCommandBuilder) WithW(w uint32) *StoreBucketTypePropsCommandBuilder

WithW sets the number of nodes that must report back a successful write in order for the command operation to be considered a success by Riak.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*StoreBucketTypePropsCommandBuilder) WithYoungVClock Uses

func (builder *StoreBucketTypePropsCommandBuilder) WithYoungVClock(youngVClock uint32) *StoreBucketTypePropsCommandBuilder

WithYoungVClock sets the old_vclock value representing an epoch time value

type StoreIndexCommand Uses

type StoreIndexCommand struct {
    Response bool
    // contains filtered or unexported fields
}

StoreIndexCommand is sused to store a new search index on Riak

func (*StoreIndexCommand) Error Uses

func (cmd *StoreIndexCommand) Error() error

func (*StoreIndexCommand) Name Uses

func (cmd *StoreIndexCommand) Name() string

Name identifies this command

func (*StoreIndexCommand) Success Uses

func (cmd *StoreIndexCommand) Success() bool

type StoreIndexCommandBuilder Uses

type StoreIndexCommandBuilder struct {
    // contains filtered or unexported fields
}

StoreIndexCommandBuilder type is required for creating new instances of StoreIndexCommand

command, err := NewStoreIndexCommandBuilder().
	WithIndexName("myIndexName").
	WithSchemaName("mySchemaName").
	Build()

func NewStoreIndexCommandBuilder Uses

func NewStoreIndexCommandBuilder() *StoreIndexCommandBuilder

NewStoreIndexCommandBuilder is a factory function for generating the command builder struct

func (*StoreIndexCommandBuilder) Build Uses

func (builder *StoreIndexCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*StoreIndexCommandBuilder) WithIndexName Uses

func (builder *StoreIndexCommandBuilder) WithIndexName(indexName string) *StoreIndexCommandBuilder

WithIndexName sets the index to use for the command

func (*StoreIndexCommandBuilder) WithNVal Uses

func (builder *StoreIndexCommandBuilder) WithNVal(nval uint32) *StoreIndexCommandBuilder

WithNVal sets the number of times this command operation is replicated in the Cluster. If ommitted, the ring default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*StoreIndexCommandBuilder) WithSchemaName Uses

func (builder *StoreIndexCommandBuilder) WithSchemaName(schemaName string) *StoreIndexCommandBuilder

WithSchemaName sets the schema that the command will use

func (*StoreIndexCommandBuilder) WithTimeout Uses

func (builder *StoreIndexCommandBuilder) WithTimeout(timeout time.Duration) *StoreIndexCommandBuilder

WithTimeout sets a timeout in milliseconds to be used for this command operation

type StoreSchemaCommand Uses

type StoreSchemaCommand struct {
    Response bool
    // contains filtered or unexported fields
}

StoreSchemaCommand is used to store / update a search schema in Riak

func (*StoreSchemaCommand) Error Uses

func (cmd *StoreSchemaCommand) Error() error

func (*StoreSchemaCommand) Name Uses

func (cmd *StoreSchemaCommand) Name() string

Name identifies this command

func (*StoreSchemaCommand) Success Uses

func (cmd *StoreSchemaCommand) Success() bool

type StoreSchemaCommandBuilder Uses

type StoreSchemaCommandBuilder struct {
    // contains filtered or unexported fields
}

StoreSchemaCommandBuilder type is required for creating new instances of StoreSchemaCommand

command, err := NewStoreSchemaCommandBuilder().
	WithSchemaName("mySchemaName").
	WithSchema("mySchemaXML").
	Build()

func NewStoreSchemaCommandBuilder Uses

func NewStoreSchemaCommandBuilder() *StoreSchemaCommandBuilder

NewStoreSchemaCommandBuilder is a factory function for generating the command builder struct

func (*StoreSchemaCommandBuilder) Build Uses

func (builder *StoreSchemaCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*StoreSchemaCommandBuilder) WithSchema Uses

func (builder *StoreSchemaCommandBuilder) WithSchema(schema string) *StoreSchemaCommandBuilder

WithSchema sets the actual schema that solr will use for indexing and queries

func (*StoreSchemaCommandBuilder) WithSchemaName Uses

func (builder *StoreSchemaCommandBuilder) WithSchemaName(schemaName string) *StoreSchemaCommandBuilder

WithSchemaName sets the name for the schema to be stored

type StoreValueCommand Uses

type StoreValueCommand struct {
    Response *StoreValueResponse
    // contains filtered or unexported fields
}

StoreValueCommand used to store a value from Riak KV.

func (*StoreValueCommand) Error Uses

func (cmd *StoreValueCommand) Error() error

func (*StoreValueCommand) Name Uses

func (cmd *StoreValueCommand) Name() string

Name identifies this command

func (*StoreValueCommand) Success Uses

func (cmd *StoreValueCommand) Success() bool

type StoreValueCommandBuilder Uses

type StoreValueCommandBuilder struct {
    // contains filtered or unexported fields
}

StoreValueCommandBuilder type is required for creating new instances of StoreValueCommand

command, err := NewStoreValueCommandBuilder().
	WithBucketType("myBucketType").
	WithBucket("myBucket").
	Build()

func NewStoreValueCommandBuilder Uses

func NewStoreValueCommandBuilder() *StoreValueCommandBuilder

NewStoreValueCommandBuilder is a factory function for generating the command builder struct

func (*StoreValueCommandBuilder) Build Uses

func (builder *StoreValueCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*StoreValueCommandBuilder) WithAsis Uses

func (builder *StoreValueCommandBuilder) WithAsis(asis bool) *StoreValueCommandBuilder

WithAsis sets the asis option Please note, this is an advanced feature, only use with caution

func (*StoreValueCommandBuilder) WithBucket Uses

func (builder *StoreValueCommandBuilder) WithBucket(bucket string) *StoreValueCommandBuilder

WithBucket sets the bucket to be used by the command

func (*StoreValueCommandBuilder) WithBucketType Uses

func (builder *StoreValueCommandBuilder) WithBucketType(bucketType string) *StoreValueCommandBuilder

WithBucketType sets the bucket-type to be used by the command. If omitted, 'default' is used

func (*StoreValueCommandBuilder) WithConflictResolver Uses

func (builder *StoreValueCommandBuilder) WithConflictResolver(resolver ConflictResolver) *StoreValueCommandBuilder

WithConflictResolver sets the ConflictResolver that should be used when sibling conflicts are found for this operation

func (*StoreValueCommandBuilder) WithContent Uses

func (builder *StoreValueCommandBuilder) WithContent(object *Object) *StoreValueCommandBuilder

WithContent sets the object / value to be stored at the specified key

func (*StoreValueCommandBuilder) WithDw Uses

func (builder *StoreValueCommandBuilder) WithDw(dw uint32) *StoreValueCommandBuilder

WithDw (durable writes) sets the number of nodes that must report back a successful write to backend storage in order for the command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*StoreValueCommandBuilder) WithIfNoneMatch Uses

func (builder *StoreValueCommandBuilder) WithIfNoneMatch(ifNoneMatch bool) *StoreValueCommandBuilder

WithIfNoneMatch tells Riak to store the object only if it does not already exist in the database

func (*StoreValueCommandBuilder) WithIfNotModified Uses

func (builder *StoreValueCommandBuilder) WithIfNotModified(ifNotModified bool) *StoreValueCommandBuilder

WithIfNotModified tells Riak to only update the object in Riak if the vclock provided matches the one currently in Riak

func (*StoreValueCommandBuilder) WithKey Uses

func (builder *StoreValueCommandBuilder) WithKey(key string) *StoreValueCommandBuilder

WithKey sets the key to be used by the command to read / write values

func (*StoreValueCommandBuilder) WithNVal Uses

func (builder *StoreValueCommandBuilder) WithNVal(nval uint32) *StoreValueCommandBuilder

WithNVal sets the number of times this command operation is replicated in the Cluster. If ommitted, the ring default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*StoreValueCommandBuilder) WithPw Uses

func (builder *StoreValueCommandBuilder) WithPw(pw uint32) *StoreValueCommandBuilder

WithPw sets the number of primary nodes (N) that must report back a successful write in order for the command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*StoreValueCommandBuilder) WithReturnBody Uses

func (builder *StoreValueCommandBuilder) WithReturnBody(returnBody bool) *StoreValueCommandBuilder

WithReturnBody sets Riak to return the value within its response after completing the write operation

func (*StoreValueCommandBuilder) WithReturnHead Uses

func (builder *StoreValueCommandBuilder) WithReturnHead(returnHead bool) *StoreValueCommandBuilder

WithReturnHead returns only the meta data for the value, useful when objects contain large amounts of data

func (*StoreValueCommandBuilder) WithSloppyQuorum Uses

func (builder *StoreValueCommandBuilder) WithSloppyQuorum(sloppyQuorum bool) *StoreValueCommandBuilder

WithSloppyQuorum sets the sloppy_quorum for this Command Please note, this is an advanced feature, only use with caution

See http://docs.basho.com/riak/latest/theory/concepts/Eventual-Consistency/

func (*StoreValueCommandBuilder) WithTimeout Uses

func (builder *StoreValueCommandBuilder) WithTimeout(timeout time.Duration) *StoreValueCommandBuilder

WithTimeout sets a timeout to be used for this command operation

func (*StoreValueCommandBuilder) WithVClock Uses

func (builder *StoreValueCommandBuilder) WithVClock(vclock []byte) *StoreValueCommandBuilder

WithVClock sets the vclock for the object to be stored, providing causal context for conflicts

func (*StoreValueCommandBuilder) WithW Uses

func (builder *StoreValueCommandBuilder) WithW(w uint32) *StoreValueCommandBuilder

WithW sets the number of nodes that must report back a successful write in order for then command operation to be considered a success by Riak

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

type StoreValueResponse Uses

type StoreValueResponse struct {
    GeneratedKey string
    VClock       []byte
    Values       []*Object
}

StoreValueResponse contains the response data for a StoreValueCommand

type TsCell Uses

type TsCell struct {
    // contains filtered or unexported fields
}

TsCell represents a cell value within a time series row

func NewBlobTsCell Uses

func NewBlobTsCell(v []byte) TsCell

NewBlobTsCell creates a TsCell from a []byte

func NewBooleanTsCell Uses

func NewBooleanTsCell(v bool) TsCell

NewBooleanTsCell creates a TsCell from a boolean

func NewDoubleTsCell Uses

func NewDoubleTsCell(v float64) TsCell

NewDoubleTsCell creates a TsCell from an floating point number

func NewSint64TsCell Uses

func NewSint64TsCell(v int64) TsCell

NewSint64TsCell creates a TsCell from an integer

func NewStringTsCell Uses

func NewStringTsCell(v string) TsCell

NewStringTsCell creates a TsCell from a string

func NewTimestampTsCell Uses

func NewTimestampTsCell(t time.Time) TsCell

NewTimestampTsCell creates a TsCell from a time.Time struct

func NewTimestampTsCellFromInt64 Uses

func NewTimestampTsCellFromInt64(v int64) TsCell

NewTimestampTsCellFromInt64 creates a TsCell from an int64 value that represents *milliseconds* since UTC epoch

func (*TsCell) GetBlobValue Uses

func (c *TsCell) GetBlobValue() []byte

GetBlobValue returns the blob value stored within the cell

func (*TsCell) GetBooleanValue Uses

func (c *TsCell) GetBooleanValue() bool

GetBooleanValue returns the boolean value stored within the cell

func (*TsCell) GetDataType Uses

func (c *TsCell) GetDataType() string

GetDataType returns the data type of the value stored within the cell

func (*TsCell) GetDoubleValue Uses

func (c *TsCell) GetDoubleValue() float64

GetDoubleValue returns the double value stored within the cell

func (*TsCell) GetSint64Value Uses

func (c *TsCell) GetSint64Value() int64

GetSint64Value returns the sint64 value stored within the cell

func (*TsCell) GetStringValue Uses

func (c *TsCell) GetStringValue() string

GetStringValue returns the string value stored within the cell

func (*TsCell) GetTimeValue Uses

func (c *TsCell) GetTimeValue() time.Time

GetTimeValue returns the timestamp value stored within the cell as a time.Time

func (*TsCell) GetTimestampValue Uses

func (c *TsCell) GetTimestampValue() int64

GetTimestampValue returns the timestamp value stored within the cell

type TsColumnDescription Uses

type TsColumnDescription struct {
    // contains filtered or unexported fields
}

TsColumnDescription describes a Time Series column

func (*TsColumnDescription) GetName Uses

func (c *TsColumnDescription) GetName() string

GetName returns the name for the column

func (*TsColumnDescription) GetType Uses

func (c *TsColumnDescription) GetType() string

GetType returns the data type for the column

type TsDeleteRowCommand Uses

type TsDeleteRowCommand struct {
    Response bool
    // contains filtered or unexported fields
}

TsDeleteRowCommand is used to delete a value from Riak TS

func (*TsDeleteRowCommand) Error Uses

func (cmd *TsDeleteRowCommand) Error() error

func (*TsDeleteRowCommand) Name Uses

func (cmd *TsDeleteRowCommand) Name() string

Name identifies this command

func (*TsDeleteRowCommand) Success Uses

func (cmd *TsDeleteRowCommand) Success() bool

type TsDeleteRowCommandBuilder Uses

type TsDeleteRowCommandBuilder struct {
    // contains filtered or unexported fields
}

TsDeleteRowCommandBuilder type is required for creating new instances of TsDeleteRowCommand

cmd, err := NewTsDeleteRowCommandBuilder().
	WithTable("myTable").
	WithKey(key).
	Build()

func NewTsDeleteRowCommandBuilder Uses

func NewTsDeleteRowCommandBuilder() *TsDeleteRowCommandBuilder

NewTsDeleteRowCommandBuilder is a factory function for generating the command builder struct

func (*TsDeleteRowCommandBuilder) Build Uses

func (builder *TsDeleteRowCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*TsDeleteRowCommandBuilder) WithKey Uses

func (builder *TsDeleteRowCommandBuilder) WithKey(key []TsCell) *TsDeleteRowCommandBuilder

WithKey sets the key to be used by the command to read / write values

func (*TsDeleteRowCommandBuilder) WithTable Uses

func (builder *TsDeleteRowCommandBuilder) WithTable(table string) *TsDeleteRowCommandBuilder

WithTable sets the table to be used by the command

func (*TsDeleteRowCommandBuilder) WithTimeout Uses

func (builder *TsDeleteRowCommandBuilder) WithTimeout(timeout time.Duration) *TsDeleteRowCommandBuilder

WithTimeout sets a timeout in milliseconds to be used for this command operation

type TsFetchRowCommand Uses

type TsFetchRowCommand struct {
    Response *TsFetchRowResponse
    // contains filtered or unexported fields
}

TsFetchRowCommand is used to fetch / get a value from Riak KV

func (*TsFetchRowCommand) Error Uses

func (cmd *TsFetchRowCommand) Error() error

func (*TsFetchRowCommand) Name Uses

func (cmd *TsFetchRowCommand) Name() string

Name identifies this command

func (*TsFetchRowCommand) Success Uses

func (cmd *TsFetchRowCommand) Success() bool

type TsFetchRowCommandBuilder Uses

type TsFetchRowCommandBuilder struct {
    // contains filtered or unexported fields
}

TsFetchRowCommandBuilder type is required for creating new instances of TsFetchRowCommand

key := make([]riak.TsCell, 3)
key[0] = NewStringTsCell("South Atlantic")
key[1] = NewStringTsCell("South Carolina")
key[2] = NewTimestampTsCell(1420113600)

cmd, err := NewTsFetchRowCommandBuilder().
	WithBucketType("myBucketType").
	WithTable("myTable").
	WithKey(key).
	Build()

func NewTsFetchRowCommandBuilder Uses

func NewTsFetchRowCommandBuilder() *TsFetchRowCommandBuilder

NewTsFetchRowCommandBuilder is a factory function for generating the command builder struct

func (*TsFetchRowCommandBuilder) Build Uses

func (builder *TsFetchRowCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*TsFetchRowCommandBuilder) WithKey Uses

func (builder *TsFetchRowCommandBuilder) WithKey(key []TsCell) *TsFetchRowCommandBuilder

WithKey sets the key to be used by the command to read / write values

func (*TsFetchRowCommandBuilder) WithTable Uses

func (builder *TsFetchRowCommandBuilder) WithTable(table string) *TsFetchRowCommandBuilder

WithTable sets the table to be used by the command

func (*TsFetchRowCommandBuilder) WithTimeout Uses

func (builder *TsFetchRowCommandBuilder) WithTimeout(timeout time.Duration) *TsFetchRowCommandBuilder

WithTimeout sets a timeout in milliseconds to be used for this command operation

type TsFetchRowResponse Uses

type TsFetchRowResponse struct {
    IsNotFound bool
    Columns    []TsColumnDescription
    Row        []TsCell
}

TsFetchRowResponse contains the response data for a TsFetchRowCommand

type TsListKeysCommand Uses

type TsListKeysCommand struct {
    Response *TsListKeysResponse
    // contains filtered or unexported fields
}

TsListKeysCommand is used to fetch values from a table in Riak TS

func (*TsListKeysCommand) Error Uses

func (cmd *TsListKeysCommand) Error() error

func (*TsListKeysCommand) Name Uses

func (cmd *TsListKeysCommand) Name() string

Name identifies this command

func (*TsListKeysCommand) Success Uses

func (cmd *TsListKeysCommand) Success() bool

type TsListKeysCommandBuilder Uses

type TsListKeysCommandBuilder struct {
    // contains filtered or unexported fields
}

TsListKeysCommandBuilder type is required for creating new instances of TsListKeysCommand

cmd, err := NewTsListKeysCommandBuilder().
	WithTable("myTable").
	WithStreaming(true).
	WithCallback(cb).
	Build()

func NewTsListKeysCommandBuilder Uses

func NewTsListKeysCommandBuilder() *TsListKeysCommandBuilder

NewTsListKeysCommandBuilder is a factory function for generating the command builder struct

func (*TsListKeysCommandBuilder) Build Uses

func (builder *TsListKeysCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*TsListKeysCommandBuilder) WithAllowListing Uses

func (builder *TsListKeysCommandBuilder) WithAllowListing() *TsListKeysCommandBuilder

WithAllowListing will allow this command to be built and execute

func (*TsListKeysCommandBuilder) WithCallback Uses

func (builder *TsListKeysCommandBuilder) WithCallback(callback func([][]TsCell) error) *TsListKeysCommandBuilder

WithCallback sets the callback to be used when handling a streaming response

Requires WithStreaming(true)

func (*TsListKeysCommandBuilder) WithStreaming Uses

func (builder *TsListKeysCommandBuilder) WithStreaming(streaming bool) *TsListKeysCommandBuilder

WithStreaming sets the command to provide a streamed response

If true, a callback must be provided via WithCallback()

func (*TsListKeysCommandBuilder) WithTable Uses

func (builder *TsListKeysCommandBuilder) WithTable(table string) *TsListKeysCommandBuilder

WithTable sets the table to be used by the command

func (*TsListKeysCommandBuilder) WithTimeout Uses

func (builder *TsListKeysCommandBuilder) WithTimeout(timeout time.Duration) *TsListKeysCommandBuilder

WithTimeout sets a timeout in milliseconds to be used for this command operation

type TsListKeysResponse Uses

type TsListKeysResponse struct {
    Keys [][]TsCell
}

TsListKeysResponse contains the response data for a TsListKeysCommand

type TsQueryCommand Uses

type TsQueryCommand struct {
    Response *TsQueryResponse
    // contains filtered or unexported fields
}

TsQueryCommand is used to fetch / get a value from Riak TS

func (*TsQueryCommand) Error Uses

func (cmd *TsQueryCommand) Error() error

func (*TsQueryCommand) Name Uses

func (cmd *TsQueryCommand) Name() string

Name identifies this command

func (*TsQueryCommand) Success Uses

func (cmd *TsQueryCommand) Success() bool

type TsQueryCommandBuilder Uses

type TsQueryCommandBuilder struct {
    // contains filtered or unexported fields
}

TsQueryCommandBuilder type is required for creating new instances of TsQueryCommand

cmd, err := NewTsQueryCommandBuilder().
	WithQuery("select * from GeoCheckin where time > 1234560 and time < 1234569 and region = 'South Atlantic'").
	WithStreaming(true).
	WithCallback(cb).
	Build()

func NewTsQueryCommandBuilder Uses

func NewTsQueryCommandBuilder() *TsQueryCommandBuilder

NewTsQueryCommandBuilder is a factory function for generating the command builder struct

func (*TsQueryCommandBuilder) Build Uses

func (builder *TsQueryCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*TsQueryCommandBuilder) WithCallback Uses

func (builder *TsQueryCommandBuilder) WithCallback(callback func([][]TsCell) error) *TsQueryCommandBuilder

WithCallback sets the callback to be used when handling a streaming response

Requires WithStreaming(true)

func (*TsQueryCommandBuilder) WithQuery Uses

func (builder *TsQueryCommandBuilder) WithQuery(query string) *TsQueryCommandBuilder

WithQuery sets the query to be used by the command

func (*TsQueryCommandBuilder) WithStreaming Uses

func (builder *TsQueryCommandBuilder) WithStreaming(streaming bool) *TsQueryCommandBuilder

WithStreaming sets the command to provide a streamed response

If true, a callback must be provided via WithCallback()

type TsQueryResponse Uses

type TsQueryResponse struct {
    Columns []TsColumnDescription
    Rows    [][]TsCell
}

TsQueryResponse contains the response data for a TsQueryCommand

type TsStoreRowsCommand Uses

type TsStoreRowsCommand struct {
    Response bool
    // contains filtered or unexported fields
}

TsStoreRowsCommand is sused to store a new row/s in Riak TS

func (*TsStoreRowsCommand) Error Uses

func (cmd *TsStoreRowsCommand) Error() error

func (*TsStoreRowsCommand) Name Uses

func (cmd *TsStoreRowsCommand) Name() string

Name identifies this command

func (*TsStoreRowsCommand) Success Uses

func (cmd *TsStoreRowsCommand) Success() bool

type TsStoreRowsCommandBuilder Uses

type TsStoreRowsCommandBuilder struct {
    // contains filtered or unexported fields
}

TsStoreRowsCommandBuilder type is required for creating new instances of StoreIndexCommand

cmd, err := NewTsStoreRowsCommandBuilder().
	WithTable("myTableName").
	WithRows(rows).
	Build()

func NewTsStoreRowsCommandBuilder Uses

func NewTsStoreRowsCommandBuilder() *TsStoreRowsCommandBuilder

NewTsStoreRowsCommandBuilder is a factory function for generating the command builder struct

func (*TsStoreRowsCommandBuilder) Build Uses

func (builder *TsStoreRowsCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*TsStoreRowsCommandBuilder) WithRows Uses

func (builder *TsStoreRowsCommandBuilder) WithRows(rows [][]TsCell) *TsStoreRowsCommandBuilder

WithRows sets the rows to be stored by the command

func (*TsStoreRowsCommandBuilder) WithTable Uses

func (builder *TsStoreRowsCommandBuilder) WithTable(table string) *TsStoreRowsCommandBuilder

WithTable sets the table to use for the command

type UpdateCounterCommand Uses

type UpdateCounterCommand struct {
    Response *UpdateCounterResponse
    // contains filtered or unexported fields
}

UpdateCounterCommand is used to increment or decrement a counter data type in Riak KV

func (*UpdateCounterCommand) Error Uses

func (cmd *UpdateCounterCommand) Error() error

func (*UpdateCounterCommand) Name Uses

func (cmd *UpdateCounterCommand) Name() string

Name identifies this command

func (*UpdateCounterCommand) Success Uses

func (cmd *UpdateCounterCommand) Success() bool

type UpdateCounterCommandBuilder Uses

type UpdateCounterCommandBuilder struct {
    // contains filtered or unexported fields
}

UpdateCounterCommandBuilder type is required for creating new instances of UpdateCounterCommand

command, err := NewUpdateCounterCommandBuilder().
	WithBucketType("myBucketType").
	WithBucket("myBucket").
	WithKey("myKey").
	WithIncrement(1).
	Build()

func NewUpdateCounterCommandBuilder Uses

func NewUpdateCounterCommandBuilder() *UpdateCounterCommandBuilder

NewUpdateCounterCommandBuilder is a factory function for generating the command builder struct

func (*UpdateCounterCommandBuilder) Build Uses

func (builder *UpdateCounterCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*UpdateCounterCommandBuilder) WithBucket Uses

func (builder *UpdateCounterCommandBuilder) WithBucket(bucket string) *UpdateCounterCommandBuilder

WithBucket sets the bucket to be used by the command

func (*UpdateCounterCommandBuilder) WithBucketType Uses

func (builder *UpdateCounterCommandBuilder) WithBucketType(bucketType string) *UpdateCounterCommandBuilder

WithBucketType sets the bucket-type to be used by the command. If omitted, 'default' is used

func (*UpdateCounterCommandBuilder) WithDw Uses

func (builder *UpdateCounterCommandBuilder) WithDw(dw uint32) *UpdateCounterCommandBuilder

WithDw (durable writes) sets the number of nodes that must report back a successful write to backend storage in order for the command operation to be considered a success by Riak

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*UpdateCounterCommandBuilder) WithIncrement Uses

func (builder *UpdateCounterCommandBuilder) WithIncrement(increment int64) *UpdateCounterCommandBuilder

WithIncrement defines the increment the Counter value is to be increased / decreased by

func (*UpdateCounterCommandBuilder) WithKey Uses

func (builder *UpdateCounterCommandBuilder) WithKey(key string) *UpdateCounterCommandBuilder

WithKey sets the key to be used by the command to read / write values

func (*UpdateCounterCommandBuilder) WithPw Uses

func (builder *UpdateCounterCommandBuilder) WithPw(pw uint32) *UpdateCounterCommandBuilder

WithPw sets the number of primary nodes (N) that must report back a successful write in order for the command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*UpdateCounterCommandBuilder) WithReturnBody Uses

func (builder *UpdateCounterCommandBuilder) WithReturnBody(returnBody bool) *UpdateCounterCommandBuilder

WithReturnBody sets Riak to return the value within its response after completing the write operation

func (*UpdateCounterCommandBuilder) WithTimeout Uses

func (builder *UpdateCounterCommandBuilder) WithTimeout(timeout time.Duration) *UpdateCounterCommandBuilder

WithTimeout sets a timeout to be used for this command operation

func (*UpdateCounterCommandBuilder) WithW Uses

func (builder *UpdateCounterCommandBuilder) WithW(w uint32) *UpdateCounterCommandBuilder

WithW sets the number of nodes that must report back a successful write in order for then command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

type UpdateCounterResponse Uses

type UpdateCounterResponse struct {
    GeneratedKey string
    CounterValue int64
}

UpdateCounterResponse is the object containing the response

type UpdateGSetCommand Uses

type UpdateGSetCommand struct {
    Response *UpdateGSetResponse
    // contains filtered or unexported fields
}

UpdateGSetCommand stores or updates a set CRDT in Riak

func (*UpdateGSetCommand) Error Uses

func (cmd *UpdateGSetCommand) Error() error

func (*UpdateGSetCommand) Name Uses

func (cmd *UpdateGSetCommand) Name() string

Name identifies this command

func (*UpdateGSetCommand) Success Uses

func (cmd *UpdateGSetCommand) Success() bool

type UpdateGSetCommandBuilder Uses

type UpdateGSetCommandBuilder struct {
    // contains filtered or unexported fields
}

UpdateGSetCommandBuilder type is required for creating new instances of UpdateGSetCommand

adds := [][]byte{
	[]byte("a1"),
	[]byte("a2"),
	[]byte("a3"),
	[]byte("a4"),
}

command := NewUpdateGSetCommandBuilder().
	WithBucketType("myBucketType").
	WithBucket("myBucket").
	WithKey("myKey").
	WithContext(setContext).
	WithAdditions(adds).
	Build()

func NewUpdateGSetCommandBuilder Uses

func NewUpdateGSetCommandBuilder() *UpdateGSetCommandBuilder

NewUpdateGSetCommandBuilder is a factory function for generating the command builder struct

func (*UpdateGSetCommandBuilder) Build Uses

func (builder *UpdateGSetCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*UpdateGSetCommandBuilder) WithAdditions Uses

func (builder *UpdateGSetCommandBuilder) WithAdditions(adds ...[]byte) *UpdateGSetCommandBuilder

WithAdditions sets the set elements to be added to the CRDT set via this update operation

func (*UpdateGSetCommandBuilder) WithBucket Uses

func (builder *UpdateGSetCommandBuilder) WithBucket(bucket string) *UpdateGSetCommandBuilder

WithBucket sets the bucket to be used by the command

func (*UpdateGSetCommandBuilder) WithBucketType Uses

func (builder *UpdateGSetCommandBuilder) WithBucketType(bucketType string) *UpdateGSetCommandBuilder

WithBucketType sets the bucket-type to be used by the command. If omitted, 'default' is used

func (*UpdateGSetCommandBuilder) WithContext Uses

func (builder *UpdateGSetCommandBuilder) WithContext(context []byte) *UpdateGSetCommandBuilder

WithContext sets the causal context needed to identify the state of the set when removing elements

func (*UpdateGSetCommandBuilder) WithDw Uses

func (builder *UpdateGSetCommandBuilder) WithDw(dw uint32) *UpdateGSetCommandBuilder

WithDw (durable writes) sets the number of nodes that must report back a successful write to backend storage in order for the command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*UpdateGSetCommandBuilder) WithKey Uses

func (builder *UpdateGSetCommandBuilder) WithKey(key string) *UpdateGSetCommandBuilder

WithKey sets the key to be used by the command to read / write values

func (*UpdateGSetCommandBuilder) WithPw Uses

func (builder *UpdateGSetCommandBuilder) WithPw(pw uint32) *UpdateGSetCommandBuilder

WithPw sets the number of primary nodes (N) that must report back a successful write in order for the command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*UpdateGSetCommandBuilder) WithReturnBody Uses

func (builder *UpdateGSetCommandBuilder) WithReturnBody(returnBody bool) *UpdateGSetCommandBuilder

WithReturnBody sets Riak to return the value within its response after completing the write operation

func (*UpdateGSetCommandBuilder) WithTimeout Uses

func (builder *UpdateGSetCommandBuilder) WithTimeout(timeout time.Duration) *UpdateGSetCommandBuilder

WithTimeout sets a timeout to be used for this command operation

func (*UpdateGSetCommandBuilder) WithW Uses

func (builder *UpdateGSetCommandBuilder) WithW(w uint32) *UpdateGSetCommandBuilder

WithW sets the number of nodes that must report back a successful write in order for then command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

type UpdateGSetResponse Uses

type UpdateGSetResponse struct {
    GeneratedKey string
    Context      []byte
    GSetValue    [][]byte
}

UpdateGSetResponse contains the response data for a UpdateGSetCommand

type UpdateHllCommand Uses

type UpdateHllCommand struct {
    Response *UpdateHllResponse
    // contains filtered or unexported fields
}

UpdateHllCommand stores or updates a set CRDT in Riak

func (*UpdateHllCommand) Error Uses

func (cmd *UpdateHllCommand) Error() error

func (*UpdateHllCommand) Name Uses

func (cmd *UpdateHllCommand) Name() string

Name identifies this command

func (*UpdateHllCommand) Success Uses

func (cmd *UpdateHllCommand) Success() bool

type UpdateHllCommandBuilder Uses

type UpdateHllCommandBuilder struct {
    // contains filtered or unexported fields
}

UpdateHllCommandBuilder type is required for creating new instances of UpdateHllCommand

adds := [][]byte{
	[]byte("a1"),
	[]byte("a2"),
	[]byte("a3"),
	[]byte("a4"),
}

command, err := NewUpdateHllCommandBuilder().
	WithBucketType("myBucketType").
	WithBucket("myBucket").
	WithKey("myKey").
	WithAdditions(adds).
	Build()

func NewUpdateHllCommandBuilder Uses

func NewUpdateHllCommandBuilder() *UpdateHllCommandBuilder

NewUpdateHllCommandBuilder is a factory function for generating the command builder struct

func (*UpdateHllCommandBuilder) Build Uses

func (builder *UpdateHllCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*UpdateHllCommandBuilder) WithAdditions Uses

func (builder *UpdateHllCommandBuilder) WithAdditions(adds ...[]byte) *UpdateHllCommandBuilder

WithAdditions sets the Hll elements to be added to the Hll Data Type via this update operation

func (*UpdateHllCommandBuilder) WithBucket Uses

func (builder *UpdateHllCommandBuilder) WithBucket(bucket string) *UpdateHllCommandBuilder

WithBucket sets the bucket to be used by the command

func (*UpdateHllCommandBuilder) WithBucketType Uses

func (builder *UpdateHllCommandBuilder) WithBucketType(bucketType string) *UpdateHllCommandBuilder

WithBucketType sets the bucket-type to be used by the command. If omitted, 'default' is used

func (*UpdateHllCommandBuilder) WithDw Uses

func (builder *UpdateHllCommandBuilder) WithDw(dw uint32) *UpdateHllCommandBuilder

WithDw (durable writes) sets the number of nodes that must report back a successful write to backend storage in order for the command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*UpdateHllCommandBuilder) WithKey Uses

func (builder *UpdateHllCommandBuilder) WithKey(key string) *UpdateHllCommandBuilder

WithKey sets the key to be used by the command to read / write values

func (*UpdateHllCommandBuilder) WithPw Uses

func (builder *UpdateHllCommandBuilder) WithPw(pw uint32) *UpdateHllCommandBuilder

WithPw sets the number of primary nodes (N) that must report back a successful write in order for the command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*UpdateHllCommandBuilder) WithReturnBody Uses

func (builder *UpdateHllCommandBuilder) WithReturnBody(returnBody bool) *UpdateHllCommandBuilder

WithReturnBody sets Riak to return the value within its response after completing the write operation

func (*UpdateHllCommandBuilder) WithTimeout Uses

func (builder *UpdateHllCommandBuilder) WithTimeout(timeout time.Duration) *UpdateHllCommandBuilder

WithTimeout sets a timeout to be used for this command operation

func (*UpdateHllCommandBuilder) WithW Uses

func (builder *UpdateHllCommandBuilder) WithW(w uint32) *UpdateHllCommandBuilder

WithW sets the number of nodes that must report back a successful write in order for then command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

type UpdateHllResponse Uses

type UpdateHllResponse struct {
    GeneratedKey string
    Cardinality  uint64
}

UpdateHllResponse contains the response data for a UpdateHllCommand

type UpdateMapCommand Uses

type UpdateMapCommand struct {
    Response *UpdateMapResponse
    // contains filtered or unexported fields
}

UpdateMapCommand updates a map CRDT in Riak

func (*UpdateMapCommand) Error Uses

func (cmd *UpdateMapCommand) Error() error

func (*UpdateMapCommand) Name Uses

func (cmd *UpdateMapCommand) Name() string

Name identifies this command

func (*UpdateMapCommand) Success Uses

func (cmd *UpdateMapCommand) Success() bool

type UpdateMapCommandBuilder Uses

type UpdateMapCommandBuilder struct {
    // contains filtered or unexported fields
}

UpdateMapCommandBuilder type is required for creating new instances of UpdateMapCommand

mapOp := &MapOperation{}
mapOp.SetRegister("register_1", []byte("register_value_1"))

command, err := NewUpdateMapCommandBuilder().
	WithBucketType("myBucketType").
	WithBucket("myBucket").
	WithKey("myKey").
	WithMapOperation(mapOp).
	Build()

func NewUpdateMapCommandBuilder Uses

func NewUpdateMapCommandBuilder() *UpdateMapCommandBuilder

NewUpdateMapCommandBuilder is a factory function for generating the command builder struct

func (*UpdateMapCommandBuilder) Build Uses

func (builder *UpdateMapCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*UpdateMapCommandBuilder) WithBucket Uses

func (builder *UpdateMapCommandBuilder) WithBucket(bucket string) *UpdateMapCommandBuilder

WithBucket sets the bucket to be used by the command

func (*UpdateMapCommandBuilder) WithBucketType Uses

func (builder *UpdateMapCommandBuilder) WithBucketType(bucketType string) *UpdateMapCommandBuilder

WithBucketType sets the bucket-type to be used by the command. If omitted, 'default' is used

func (*UpdateMapCommandBuilder) WithContext Uses

func (builder *UpdateMapCommandBuilder) WithContext(context []byte) *UpdateMapCommandBuilder

WithContext sets the causal context needed to identify the state of the map when removing elements

func (*UpdateMapCommandBuilder) WithDw Uses

func (builder *UpdateMapCommandBuilder) WithDw(dw uint32) *UpdateMapCommandBuilder

WithDw (durable writes) sets the number of nodes that must report back a successful write to backend storage in order for the command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*UpdateMapCommandBuilder) WithKey Uses

func (builder *UpdateMapCommandBuilder) WithKey(key string) *UpdateMapCommandBuilder

WithKey sets the key to be used by the command to read / write values

func (*UpdateMapCommandBuilder) WithMapOperation Uses

func (builder *UpdateMapCommandBuilder) WithMapOperation(mapOperation *MapOperation) *UpdateMapCommandBuilder

WithMapOperation provides the details of what is supposed to be updated on the map

func (*UpdateMapCommandBuilder) WithPw Uses

func (builder *UpdateMapCommandBuilder) WithPw(pw uint32) *UpdateMapCommandBuilder

WithPw sets the number of primary nodes (N) that must report back a successful write in order for the command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*UpdateMapCommandBuilder) WithReturnBody Uses

func (builder *UpdateMapCommandBuilder) WithReturnBody(returnBody bool) *UpdateMapCommandBuilder

WithReturnBody sets Riak to return the value within its response after completing the write operation

func (*UpdateMapCommandBuilder) WithTimeout Uses

func (builder *UpdateMapCommandBuilder) WithTimeout(timeout time.Duration) *UpdateMapCommandBuilder

WithTimeout sets a timeout in milliseconds to be used for this command operation

func (*UpdateMapCommandBuilder) WithW Uses

func (builder *UpdateMapCommandBuilder) WithW(w uint32) *UpdateMapCommandBuilder

WithW sets the number of nodes that must report back a successful write in order for then command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

type UpdateMapResponse Uses

type UpdateMapResponse struct {
    GeneratedKey string
    Context      []byte
    Map          *Map
}

UpdateMapResponse contains the response data for a UpdateMapCommand

type UpdateSetCommand Uses

type UpdateSetCommand struct {
    Response *UpdateSetResponse
    // contains filtered or unexported fields
}

UpdateSetCommand stores or updates a set CRDT in Riak

func (*UpdateSetCommand) Error Uses

func (cmd *UpdateSetCommand) Error() error

func (*UpdateSetCommand) Name Uses

func (cmd *UpdateSetCommand) Name() string

Name identifies this command

func (*UpdateSetCommand) Success Uses

func (cmd *UpdateSetCommand) Success() bool

type UpdateSetCommandBuilder Uses

type UpdateSetCommandBuilder struct {
    // contains filtered or unexported fields
}

UpdateSetCommandBuilder type is required for creating new instances of UpdateSetCommand

adds := [][]byte{
	[]byte("a1"),
	[]byte("a2"),
	[]byte("a3"),
	[]byte("a4"),
}

command, err := NewUpdateSetCommandBuilder().
	WithBucketType("myBucketType").
	WithBucket("myBucket").
	WithKey("myKey").
	WithContext(setContext).
	WithAdditions(adds).
	Build()

func NewUpdateSetCommandBuilder Uses

func NewUpdateSetCommandBuilder() *UpdateSetCommandBuilder

NewUpdateSetCommandBuilder is a factory function for generating the command builder struct

func (*UpdateSetCommandBuilder) Build Uses

func (builder *UpdateSetCommandBuilder) Build() (Command, error)

Build validates the configuration options provided then builds the command

func (*UpdateSetCommandBuilder) WithAdditions Uses

func (builder *UpdateSetCommandBuilder) WithAdditions(adds ...[]byte) *UpdateSetCommandBuilder

WithAdditions sets the set elements to be added to the CRDT set via this update operation

func (*UpdateSetCommandBuilder) WithBucket Uses

func (builder *UpdateSetCommandBuilder) WithBucket(bucket string) *UpdateSetCommandBuilder

WithBucket sets the bucket to be used by the command

func (*UpdateSetCommandBuilder) WithBucketType Uses

func (builder *UpdateSetCommandBuilder) WithBucketType(bucketType string) *UpdateSetCommandBuilder

WithBucketType sets the bucket-type to be used by the command. If omitted, 'default' is used

func (*UpdateSetCommandBuilder) WithContext Uses

func (builder *UpdateSetCommandBuilder) WithContext(context []byte) *UpdateSetCommandBuilder

WithContext sets the causal context needed to identify the state of the set when removing elements

func (*UpdateSetCommandBuilder) WithDw Uses

func (builder *UpdateSetCommandBuilder) WithDw(dw uint32) *UpdateSetCommandBuilder

WithDw (durable writes) sets the number of nodes that must report back a successful write to backend storage in order for the command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*UpdateSetCommandBuilder) WithKey Uses

func (builder *UpdateSetCommandBuilder) WithKey(key string) *UpdateSetCommandBuilder

WithKey sets the key to be used by the command to read / write values

func (*UpdateSetCommandBuilder) WithPw Uses

func (builder *UpdateSetCommandBuilder) WithPw(pw uint32) *UpdateSetCommandBuilder

WithPw sets the number of primary nodes (N) that must report back a successful write in order for the command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

func (*UpdateSetCommandBuilder) WithRemovals Uses

func (builder *UpdateSetCommandBuilder) WithRemovals(removals ...[]byte) *UpdateSetCommandBuilder

WithRemovals sets the set elements to be removed from the CRDT set via this update operation

func (*UpdateSetCommandBuilder) WithReturnBody Uses

func (builder *UpdateSetCommandBuilder) WithReturnBody(returnBody bool) *UpdateSetCommandBuilder

WithReturnBody sets Riak to return the value within its response after completing the write operation

func (*UpdateSetCommandBuilder) WithTimeout Uses

func (builder *UpdateSetCommandBuilder) WithTimeout(timeout time.Duration) *UpdateSetCommandBuilder

WithTimeout sets a timeout to be used for this command operation

func (*UpdateSetCommandBuilder) WithW Uses

func (builder *UpdateSetCommandBuilder) WithW(w uint32) *UpdateSetCommandBuilder

WithW sets the number of nodes that must report back a successful write in order for then command operation to be considered a success by Riak. If ommitted, the bucket default is used.

See http://basho.com/posts/technical/riaks-config-behaviors-part-2/

type UpdateSetResponse Uses

type UpdateSetResponse struct {
    GeneratedKey string
    Context      []byte
    SetValue     [][]byte
}

UpdateSetResponse contains the response data for a UpdateSetCommand

Directories

PathSynopsis
rpb/riakPackage riak is a generated protocol buffer package.
rpb/riak_dtPackage riak_dt is a generated protocol buffer package.
rpb/riak_kvPackage riak_kv is a generated protocol buffer package.
rpb/riak_searchPackage riak_search is a generated protocol buffer package.
rpb/riak_tsPackage riak_ts is a generated protocol buffer package.
rpb/riak_yokozunaPackage riak_yokozuna is a generated protocol buffer package.

Package riak imports 24 packages (graph) and is imported by 19 packages. Updated 2017-03-27. Refresh now. Tools for package owners.