Skip to content

Latest commit

 

History

History
103 lines (68 loc) · 2.11 KB

aerospike.md

File metadata and controls

103 lines (68 loc) · 2.11 KB

Aerospike Package

Usage

The aerospike package can be imported into your project via:

  import as "github.com/aerospike/aerospike-client-go"

Structs

Policies

Policies contain the allowed values for operation conditions for each of the client operations.

For details, see Policies Object

Log

Log is a collection of the various logging levels available in Aerospike. This logging levels can be used to modify the granularity of logging from the API. Default level is LOG_ERR.

    as.Logger.SetLevel(as.INFO)

For details, see Logger Object

client(host string, port int): *Client

Creates a new client with the provided configuration.

Parameters:

  • name – Host name or IP to connect to.
  • port – Host port.

Returns a new client object.

Example:

  client, err := as.NewClient("127.0.0.1", 3000)

For detals, see Client Class.

NewKey(ns, set string, key interface{}): *

Creates a new key object with the provided arguments.

Parameters:

  • ns – The namespace for the key.
  • set – The set for the key.
  • key – The value for the key.

Returns a new key.

Example:

  key := as.Key("test", "demo", 123)

For details, see Key Object.