Documentation ¶
Index ¶
- Constants
- func HashCode(s string) int32
- func HashCodeForSlice(b []byte) int32
- func ReadArrayBinaryObject(r io.Reader) (interface{}, error)
- func ReadArrayBools(r io.Reader) ([]bool, error)
- func ReadArrayBytes(r io.Reader) ([]byte, error)
- func ReadArrayDoubles(r io.Reader) ([]float64, error)
- func ReadArrayFloats(r io.Reader) ([]float32, error)
- func ReadArrayInts(r io.Reader) ([]int32, error)
- func ReadArrayLongs(r io.Reader) ([]int64, error)
- func ReadArrayODates(r io.Reader) ([]time.Time, error)
- func ReadArrayOStrings(r io.Reader) ([]string, error)
- func ReadArrayOTimes(r io.Reader) ([]time.Time, error)
- func ReadArrayOTimestamps(r io.Reader) ([]time.Time, error)
- func ReadArrayOUUIDs(r io.Reader) ([]uuid.UUID, error)
- func ReadArrayShorts(r io.Reader) ([]int16, error)
- func ReadBool(r io.Reader) (bool, error)
- func ReadByte(r io.Reader) (byte, error)
- func ReadDate(r io.Reader) (time.Time, error)
- func ReadDouble(r io.Reader) (float64, error)
- func ReadFloat(r io.Reader) (float32, error)
- func ReadInt(r io.Reader) (int32, error)
- func ReadLong(r io.Reader) (int64, error)
- func ReadOString(r io.Reader) (string, error)
- func ReadObject(r io.Reader) (interface{}, error)
- func ReadShort(r io.Reader) (int16, error)
- func ReadString(r io.Reader) (string, error)
- func ReadTime(r io.Reader) (time.Time, error)
- func ReadTimestamp(r io.Reader) (time.Time, error)
- func ReadUUID(r io.Reader) (uuid.UUID, error)
- func WriteBool(w io.Writer, v bool) error
- func WriteByte(w io.Writer, v byte) error
- func WriteBytes(w io.Writer, v []byte) error
- func WriteChar(w io.Writer, v Char) error
- func WriteDouble(w io.Writer, v float64) error
- func WriteFloat(w io.Writer, v float32) error
- func WriteInt(w io.Writer, v int32) error
- func WriteLong(w io.Writer, v int64) error
- func WriteNull(w io.Writer) error
- func WriteOArrayBools(w io.Writer, v []bool) error
- func WriteOArrayBytes(w io.Writer, v []byte) error
- func WriteOArrayChars(w io.Writer, v []Char) error
- func WriteOArrayDoubles(w io.Writer, v []float64) error
- func WriteOArrayFloats(w io.Writer, v []float32) error
- func WriteOArrayGoInts(w io.Writer, v []int) error
- func WriteOArrayInts(w io.Writer, v []int32) error
- func WriteOArrayLongs(w io.Writer, v []int64) error
- func WriteOArrayODates(w io.Writer, v []Date) error
- func WriteOArrayOStrings(w io.Writer, v []string) error
- func WriteOArrayOTimes(w io.Writer, v []Time) error
- func WriteOArrayOTimestamps(w io.Writer, v []time.Time) error
- func WriteOArrayOUUIDs(w io.Writer, v []uuid.UUID) error
- func WriteOArrayShorts(w io.Writer, v []int16) error
- func WriteOBool(w io.Writer, v bool) error
- func WriteOByte(w io.Writer, v byte) error
- func WriteOChar(w io.Writer, v Char) error
- func WriteOComplexObject(w io.Writer, v ComplexObject) error
- func WriteODate(w io.Writer, v Date) error
- func WriteODouble(w io.Writer, v float64) error
- func WriteOFloat(w io.Writer, v float32) error
- func WriteOInt(w io.Writer, v int32) error
- func WriteOLong(w io.Writer, v int64) error
- func WriteOShort(w io.Writer, v int16) error
- func WriteOString(w io.Writer, v string) error
- func WriteOTime(w io.Writer, v Time) error
- func WriteOTimestamp(w io.Writer, v time.Time) error
- func WriteOUUID(w io.Writer, v uuid.UUID) error
- func WriteObject(w io.Writer, o interface{}) error
- func WriteShort(w io.Writer, v int16) error
- func WriteType(w io.Writer, code byte) error
- type CacheConfiguration
- type CacheConfigurationRefs
- type CacheKeyConfiguration
- type Char
- type Client
- type ComplexObject
- type ConnInfo
- type Date
- type Field
- type FieldNameAlias
- type QueryEntity
- type QueryField
- type QueryIndex
- type QuerySQLData
- type QuerySQLFieldsData
- type QuerySQLFieldsPage
- type QuerySQLFieldsResult
- type QuerySQLPage
- type QuerySQLResult
- type QueryScanData
- type QueryScanPage
- type QueryScanResult
- type Request
- type RequestCacheCreateWithConfiguration
- type RequestHandshake
- type RequestOperation
- type Response
- type ResponseHandshake
- type ResponseOperation
- type Time
Constants ¶
const ( // CacheAtomicityModeTransactional is TRANSACTIONAL = 0 CacheAtomicityModeTransactional = 0 // CacheAtomicityModeAtomic is ATOMIC = 1 CacheAtomicityModeAtomic = 1 // CacheModeLocal is LOCAL = 0 CacheModeLocal = 0 // CacheModeReplicated is REPLICATED = 1 CacheModeReplicated = 1 // CacheModePartitioned is PARTITIONED = 2 CacheModePartitioned = 2 // PartitionLossPolicyReadOnlySafe is READ_ONLY_SAFE = 0 PartitionLossPolicyReadOnlySafe = 0 // PartitionLossPolicyReadOnlyAll is READ_ONLY_ALL = 1 PartitionLossPolicyReadOnlyAll = 1 // PartitionLossPolicyReadWriteSafe is READ_WRITE_SAFE = 2 PartitionLossPolicyReadWriteSafe = 2 // PartitionLossPolicyReadWriteAll is READ_WRITE_ALL = 3 PartitionLossPolicyReadWriteAll = 3 // PartitionLossPolicyIgnore is IGNORE = 4 PartitionLossPolicyIgnore = 4 // RebalanceModeSync is SYNC = 0 RebalanceModeSync = 0 // RebalanceModeASync is ASYNC = 1 RebalanceModeASync = 0 // RebalanceModeNone is NONE = 2 RebalanceModeNone = 2 // WriteSynchronizationModeFullSync is FULL_SYNC = 0 WriteSynchronizationModeFullSync = 0 // WriteSynchronizationModeFullASync is FULL_ASYNC = 1 WriteSynchronizationModeFullASync = 1 // WriteSynchronizationModePrimarySync is PRIMARY_SYNC = 2 WriteSynchronizationModePrimarySync = 2 // QueryIndexTypeSorted is SORTED = 0 QueryIndexTypeSorted = 0 // QueryIndexTypeFullText is FULLTEXT = 1 QueryIndexTypeFullText = 1 // QueryIndexTypeGeospatial is GEOSPATIAL = 2 QueryIndexTypeGeospatial = 2 )
const ( // PeekModeAll is ALL PeekModeAll = 0 // PeekModeNear is NEAR PeekModeNear = 1 // PeekModePrimary is PRIMARY PeekModePrimary = 2 // PeekModeBackup is BACKUP PeekModeBackup = 3 )
const ( // StatementTypeAny is ANY = 0 StatementTypeAny byte = 0 // StatementTypeSelect is SELECT = 1 StatementTypeSelect byte = 1 // StatementTypeUpdate is UPDATE = 2 StatementTypeUpdate byte = 2 )
const ( // OpCacheGetNames gets existing cache names. OpCacheGetNames = 1050 // OpCacheCreateWithName creates a cache with a given name. OpCacheCreateWithName = 1051 // OpCacheGetOrCreateWithName creates a cache with a given name. // Does nothing if the cache exists. OpCacheGetOrCreateWithName = 1052 // OpCacheCreateWithConfiguration creates cache with provided configuration. OpCacheCreateWithConfiguration = 1053 // OpCacheGetOrCreateWithConfiguration creates cache with provided configuration. // Does nothing if the name is already in use. OpCacheGetOrCreateWithConfiguration = 1054 // OpCacheGetConfiguration gets configuration for the given cache. OpCacheGetConfiguration = 1055 // OpCacheDestroy destroys cache with a given name. OpCacheDestroy = 1056 // OpCacheGet retrieves a value from cache by key. OpCacheGet = 1000 // OpCachePut puts a value with a given key to cache (overwriting existing value if any). OpCachePut = 1001 // OpCachePutIfAbsent puts a value with a given key to cache only if the key does not already exist. OpCachePutIfAbsent = 1002 // OpCacheGetAll retrieves multiple key-value pairs from cache. OpCacheGetAll = 1003 // OpCachePutAll puts multiple key-value pairs to cache (overwriting existing associations if any). OpCachePutAll = 1004 // OpCacheGetAndPut puts a value with a given key to cache, and returns the previous value for that key. OpCacheGetAndPut = 1005 // OpCacheGetAndReplace puts a value with a given key to cache, returning previous value for that key, // if and only if there is a value currently mapped for that key. OpCacheGetAndReplace = 1006 // OpCacheGetAndRemove removes the cache entry with specified key, returning the value. OpCacheGetAndRemove = 1007 // OpCacheGetAndPutIfAbsent puts a value with a given key to cache only if the key does not already exist. OpCacheGetAndPutIfAbsent = 1008 // OpCacheReplace puts a value with a given key to cache only if the key already exists. OpCacheReplace = 1009 // OpCacheReplaceIfEquals puts a value with a given key to cache only if the key already exists and value equals provided value. OpCacheReplaceIfEquals = 1010 // OpCacheContainsKey returns a value indicating whether given key is present in cache. OpCacheContainsKey = 1011 // OpCacheContainsKeys returns a value indicating whether all given keys are present in cache. OpCacheContainsKeys = 1012 // OpCacheClear clears the cache without notifying listeners or cache writers. OpCacheClear = 1013 // OpCacheClearKey clears the cache key without notifying listeners or cache writers. OpCacheClearKey = 1014 // OpCacheClearKeys clears the cache keys without notifying listeners or cache writers. OpCacheClearKeys = 1015 // OpCacheRemoveKey removes an entry with a given key, notifying listeners and cache writers. OpCacheRemoveKey = 1016 // OpCacheRemoveIfEquals removes an entry with a given key if provided value is equal to actual value, // notifying listeners and cache writers. OpCacheRemoveIfEquals = 1017 // OpCacheRemoveKeys removes entries with given keys, notifying listeners and cache writers. OpCacheRemoveKeys = 1018 // OpCacheRemoveAll removes all entries from cache, notifying listeners and cache writers. OpCacheRemoveAll = 1019 // OpCacheGetSize gets the number of entries in cache. OpCacheGetSize = 1020 // OpQuerySQL executes an SQL query over data stored in the cluster. // The query returns the whole record (key and value). OpQuerySQL = 2002 // OpQuerySQLCursorGetPage retrieves the next SQL query cursor page by cursor id from OP_QUERY_SQL. OpQuerySQLCursorGetPage = 2003 // OpQuerySQLFields performs SQL fields query. OpQuerySQLFields = 2004 // OpQuerySQLFieldsCursorGetPage retrieves the next query result page by cursor id from OP_QUERY_SQL_FIELDS. OpQuerySQLFieldsCursorGetPage = 2005 // OpQueryScan performs scan query. OpQueryScan = 2000 // OpQueryScanCursorGetPage fetches the next SQL query cursor page by cursor id that is obtained from OP_QUERY_SCAN. OpQueryScanCursorGetPage = 2001 // OpResourceClose closes a resource, such as query cursor. OpResourceClose = 0 )
const ( // ComplexObjectHeaderLength is complex object header length ComplexObjectHeaderLength = 24 // ComplexObjectVersion is version of complex format ComplexObjectVersion = 1 // ComplexObjectUserType is user type FLAG_USR_TYP = 0x0001 ComplexObjectUserType = 0x0001 // ComplexObjectHasSchema is only raw data exists FLAG_HAS_SCHEMA = 0x0002 ComplexObjectHasSchema = 0x0002 // ComplexObjectHasRaw is indicating that object has raw data FLAG_HAS_RAW = 0x0004 ComplexObjectHasRaw = 0x0004 // ComplexObjectOffsetOneByte is offsets take 1 byte FLAG_OFFSET_ONE_BYTE = 0x0008 ComplexObjectOffsetOneByte = 0x0008 // ComplexObjectOffsetTwoBytes is offsets take 2 bytes FLAG_OFFSET_TWO_BYTES = 0x0010 ComplexObjectOffsetTwoBytes = 0x0010 ComplexObjectCompactFooter = 0x0020 )
const (
// OperationStatusSuccess means success
OperationStatusSuccess = 0
)
Variables ¶
This section is empty.
Functions ¶
func HashCodeForSlice ¶ added in v0.8.0
HashCodeForSlice calculates Java hash code for byte array
func ReadArrayBinaryObject ¶ added in v0.8.0
ReadArrayBinaryObject reads "binary object" value wrapped by array
func ReadArrayBools ¶ added in v0.8.0
ReadArrayBools reads "bool" array value
func ReadArrayBytes ¶ added in v0.8.0
ReadArrayBytes reads "byte" array value
func ReadArrayDoubles ¶ added in v0.8.0
ReadArrayDoubles reads "double" array value
func ReadArrayFloats ¶ added in v0.8.0
ReadArrayFloats reads "float" array value
func ReadArrayInts ¶ added in v0.8.0
ReadArrayInts reads "int" array value
func ReadArrayLongs ¶ added in v0.8.0
ReadArrayLongs reads "long" array value
func ReadArrayODates ¶ added in v0.8.0
ReadArrayODates reads "Date" array value
func ReadArrayOStrings ¶ added in v0.8.0
ReadArrayOStrings reads "String" array value
func ReadArrayOTimes ¶ added in v0.8.0
ReadArrayOTimes reads "Time" array value
func ReadArrayOTimestamps ¶ added in v0.8.0
ReadArrayOTimestamps reads "Timestamp" array value
func ReadArrayOUUIDs ¶ added in v0.8.0
ReadArrayOUUIDs reads "UUID" array value
func ReadArrayShorts ¶ added in v0.8.0
ReadArrayShorts reads "short" array value
func ReadDouble ¶ added in v0.8.0
ReadDouble reads "Double" value
func ReadOString ¶ added in v0.8.0
ReadOString reads "string" object value or NULL (returns "")
func ReadObject ¶ added in v0.8.0
ReadObject read object
func ReadString ¶ added in v0.8.0
ReadString reads "string" value
func ReadTimestamp ¶ added in v0.8.0
ReadTimestamp reads "Timestamp" object value
func WriteBytes ¶ added in v0.8.0
WriteBytes writes byte slice
func WriteDouble ¶ added in v0.8.0
WriteDouble writes "double" value
func WriteFloat ¶ added in v0.8.0
WriteFloat writes "float" value
func WriteOArrayBools ¶ added in v0.8.0
WriteOArrayBools writes "Bool" array object value
func WriteOArrayBytes ¶ added in v0.8.0
WriteOArrayBytes writes "byte" array object value
func WriteOArrayChars ¶ added in v0.8.0
WriteOArrayChars writes "char" array object value
func WriteOArrayDoubles ¶ added in v0.8.0
WriteOArrayDoubles writes "double" array object value
func WriteOArrayFloats ¶ added in v0.8.0
WriteOArrayFloats writes "float" array object value
func WriteOArrayGoInts ¶ added in v0.12.2
WriteOArrayGoInts writes "Go int" array object value
func WriteOArrayInts ¶ added in v0.8.0
WriteOArrayInts writes "int" array object value
func WriteOArrayLongs ¶ added in v0.8.0
WriteOArrayLongs writes "long" array object value
func WriteOArrayODates ¶ added in v0.8.0
WriteOArrayODates writes "Date" array object value
func WriteOArrayOStrings ¶ added in v0.8.0
WriteOArrayOStrings writes "String" array object value
func WriteOArrayOTimes ¶ added in v0.8.0
WriteOArrayOTimes writes "Time" array object value
func WriteOArrayOTimestamps ¶ added in v0.8.0
WriteOArrayOTimestamps writes "Timestamp" array object value
func WriteOArrayOUUIDs ¶ added in v0.8.0
WriteOArrayOUUIDs writes "UUID" array object value
func WriteOArrayShorts ¶ added in v0.8.0
WriteOArrayShorts writes "short" array object value
func WriteOBool ¶ added in v0.8.0
WriteOBool writes "bool" object value
func WriteOByte ¶ added in v0.8.0
WriteOByte writes "byte" object value
func WriteOChar ¶ added in v0.8.0
WriteOChar writes "char" object value
func WriteOComplexObject ¶ added in v0.8.0
func WriteOComplexObject(w io.Writer, v ComplexObject) error
WriteOComplexObject writes complex object
func WriteODate ¶ added in v0.8.0
WriteODate writes "Date" object value
func WriteODouble ¶ added in v0.8.0
WriteODouble writes "double" object value
func WriteOFloat ¶ added in v0.8.0
WriteOFloat writes "float" object value
func WriteOLong ¶ added in v0.8.0
WriteOLong writes "long" object value
func WriteOShort ¶ added in v0.8.0
WriteOShort writes "short" object value
func WriteOString ¶ added in v0.8.0
WriteOString writes "string" object value String is marshalling as object in all cases.
func WriteOTime ¶ added in v0.8.0
WriteOTime writes "Time" object value Time is marshaled as object in all cases.
func WriteOTimestamp ¶ added in v0.8.0
WriteOTimestamp writes "Timestamp" object value Timestamp is marshaled as object in all cases.
func WriteOUUID ¶ added in v0.8.0
WriteOUUID writes "UUID" object value UUID is marshaled as object in all cases.
func WriteObject ¶ added in v0.8.0
WriteObject writes object
func WriteShort ¶ added in v0.8.0
WriteShort writes "short" value
Types ¶
type CacheConfiguration ¶
type CacheConfiguration struct { AtomicityMode int32 Backups int32 CacheMode int32 CopyOnRead bool DataRegionName string EagerTTL bool EnableStatistics bool GroupName string LockTimeout int64 MaxConcurrentAsyncOperations int32 MaxQueryIterators int32 Name string OnheapCacheEnabled bool PartitionLossPolicy int32 QueryDetailMetricsSize int32 QueryParellelism int32 ReadFromBackup bool RebalanceBatchSize int32 RebalanceBatchesPrefetchCount int64 RebalanceDelay int64 RebalanceMode int32 RebalanceOrder int32 RebalanceThrottle int64 RebalanceTimeout int64 SQLEscapeAll bool SQLIndexInlineMaxSize int32 SQLSchema string WriteSynchronizationMode int32 CacheKeyConfigurations []CacheKeyConfiguration QueryEntities []QueryEntity }
CacheConfiguration describes cache configuration
type CacheConfigurationRefs ¶
type CacheConfigurationRefs struct { AtomicityMode *int32 Backups *int32 CacheMode *int32 CopyOnRead *bool DataRegionName *string EagerTTL *bool EnableStatistics *bool GroupName *string LockTimeout *int64 MaxConcurrentAsyncOperations *int32 MaxQueryIterators *int32 Name *string OnheapCacheEnabled *bool PartitionLossPolicy *int32 QueryDetailMetricsSize *int32 QueryParellelism *int32 ReadFromBackup *bool RebalanceBatchSize *int32 RebalanceBatchesPrefetchCount *int64 RebalanceDelay *int64 RebalanceMode *int32 RebalanceOrder *int32 RebalanceThrottle *int64 RebalanceTimeout *int64 SQLEscapeAll *bool SQLIndexInlineMaxSize *int32 SQLSchema *string WriteSynchronizationMode *int32 CacheKeyConfigurations []CacheKeyConfiguration QueryEntities []QueryEntity }
CacheConfigurationRefs describes cache configuration to create new cache
type CacheKeyConfiguration ¶
CacheKeyConfiguration is struct
type Char ¶
type Char rune
Char is Apache Ignite "char" type
func ReadArrayChars ¶ added in v0.8.0
ReadArrayChars reads "char" array value
type Client ¶
type Client interface { // Connected return true if connection to the cluster is active Connected() bool // Do sends request and receives response Do(req Request, res Response) error // Close closes connection. // Returns: // nil in case of success. // error object in case of error. Close() error // CacheCreateWithName Creates a cache with a given name. // Cache template can be applied if there is a '*' in the cache name. // https://apacheignite.readme.io/docs/binary-client-protocol-cache-configuration-operations#section-op_cache_create_with_name CacheCreateWithName(cache string) error // CacheGetOrCreateWithName creates a cache with a given name. // Cache template can be applied if there is a '*' in the cache name. // Does nothing if the cache exists. // https://apacheignite.readme.io/docs/binary-client-protocol-cache-configuration-operations#section-op_cache_get_or_create_with_name CacheGetOrCreateWithName(cache string) error // CacheGetNames returns existing cache names. // https://apacheignite.readme.io/docs/binary-client-protocol-cache-configuration-operations#section-op_cache_get_names CacheGetNames() ([]string, error) // CacheGetConfiguration gets configuration for the given cache. // https://apacheignite.readme.io/docs/binary-client-protocol-cache-configuration-operations#section-op_cache_get_configuration CacheGetConfiguration(cache string, flag byte) (*CacheConfiguration, error) // CacheCreateWithConfiguration creates cache with provided configuration. // An error is returned if the name is already in use. // https://apacheignite.readme.io/docs/binary-client-protocol-cache-configuration-operations#section-op_cache_create_with_configuration CacheCreateWithConfiguration(cc *CacheConfigurationRefs) error // CacheGetOrCreateWithConfiguration creates cache with provided configuration. // Does nothing if the name is already in use. // https://apacheignite.readme.io/docs/binary-client-protocol-cache-configuration-operations#section-op_cache_get_or_create_with_configuration CacheGetOrCreateWithConfiguration(cc *CacheConfigurationRefs) error // CacheDestroy destroys cache with a given name. // https://apacheignite.readme.io/docs/binary-client-protocol-cache-configuration-operations#section-op_cache_destroy CacheDestroy(cache string) error // CacheGet retrieves a value from cache by key. // https://apacheignite.readme.io/docs/binary-client-protocol-key-value-operations#section-op_cache_get CacheGet(cache string, binary bool, key interface{}) (interface{}, error) // CacheGetAll retrieves multiple key-value pairs from cache. // https://apacheignite.readme.io/docs/binary-client-protocol-key-value-operations#section-op_cache_get_all CacheGetAll(cache string, binary bool, keys []interface{}) (map[interface{}]interface{}, error) // CachePut puts a value with a given key to cache (overwriting existing value if any). // https://apacheignite.readme.io/docs/binary-client-protocol-key-value-operations#section-op_cache_put CachePut(cache string, binary bool, key interface{}, value interface{}) error // CachePutAll puts a value with a given key to cache (overwriting existing value if any). // https://apacheignite.readme.io/docs/binary-client-protocol-key-value-operations#section-op_cache_put_all CachePutAll(cache string, binary bool, data map[interface{}]interface{}) error // CacheContainsKey returns a value indicating whether given key is present in cache. // https://apacheignite.readme.io/docs/binary-client-protocol-key-value-operations#section-op_cache_contains_key CacheContainsKey(cache string, binary bool, key interface{}) (bool, error) // CacheContainsKeys returns a value indicating whether all given keys are present in cache. // https://apacheignite.readme.io/docs/binary-client-protocol-key-value-operations#section-op_cache_contains_keys CacheContainsKeys(cache string, binary bool, keys []interface{}) (bool, error) // CacheGetAndPut puts a value with a given key to cache, and returns the previous value for that key. // https://apacheignite.readme.io/docs/binary-client-protocol-key-value-operations#section-op_cache_get_and_put CacheGetAndPut(cache string, binary bool, key interface{}, value interface{}) (interface{}, error) // CacheGetAndReplace puts a value with a given key to cache, returning previous value for that key, // if and only if there is a value currently mapped for that key. // https://apacheignite.readme.io/docs/binary-client-protocol-key-value-operations#section-op_cache_get_and_replace CacheGetAndReplace(cache string, binary bool, key interface{}, value interface{}) (interface{}, error) // CacheGetAndRemove removes the cache entry with specified key, returning the value. // https://apacheignite.readme.io/docs/binary-client-protocol-key-value-operations#section-op_cache_get_and_remove CacheGetAndRemove(cache string, binary bool, key interface{}) (interface{}, error) // CachePutIfAbsent puts a value with a given key to cache only if the key does not already exist. // https://apacheignite.readme.io/docs/binary-client-protocol-key-value-operations#section-op_cache_put_if_absent CachePutIfAbsent(cache string, binary bool, key interface{}, value interface{}) (bool, error) // CacheGetAndPutIfAbsent puts a value with a given key to cache only if the key does not already exist. // https://apacheignite.readme.io/docs/binary-client-protocol-key-value-operations#section-op_cache_get_and_put_if_absent CacheGetAndPutIfAbsent(cache string, binary bool, key interface{}, value interface{}) (interface{}, error) // CacheReplace puts a value with a given key to cache only if the key already exists. // https://apacheignite.readme.io/docs/binary-client-protocol-key-value-operations#section-op_cache_replace CacheReplace(cache string, binary bool, key interface{}, value interface{}) (bool, error) // CacheReplaceIfEquals puts a value with a given key to cache only if // the key already exists and value equals provided value. // https://apacheignite.readme.io/docs/binary-client-protocol-key-value-operations#section-op_cache_replace_if_equals CacheReplaceIfEquals(cache string, binary bool, key interface{}, valueCompare interface{}, valueNew interface{}) (bool, error) // CacheClear clears the cache without notifying listeners or cache writers. // https://apacheignite.readme.io/docs/binary-client-protocol-key-value-operations#section-op_cache_clear CacheClear(cache string, binary bool) error // CacheClearKey clears the cache key without notifying listeners or cache writers. // https://apacheignite.readme.io/docs/binary-client-protocol-key-value-operations#section-op_cache_clear_key CacheClearKey(cache string, binary bool, key interface{}) error // CacheClearKeys clears the cache keys without notifying listeners or cache writers. // https://apacheignite.readme.io/docs/binary-client-protocol-key-value-operations#section-op_cache_clear_keys CacheClearKeys(cache string, binary bool, keys []interface{}) error // CacheRemoveKey removes an entry with a given key, notifying listeners and cache writers. // https://apacheignite.readme.io/docs/binary-client-protocol-key-value-operations#section-op_cache_remove_key CacheRemoveKey(cache string, binary bool, key interface{}) (bool, error) // CacheRemoveIfEquals removes an entry with a given key if provided value is equal to actual value, // notifying listeners and cache writers. // https://apacheignite.readme.io/docs/binary-client-protocol-key-value-operations#section-op_cache_remove_if_equals CacheRemoveIfEquals(cache string, binary bool, key interface{}, value interface{}) (bool, error) // CacheGetSize gets the number of entries in cache. // https://apacheignite.readme.io/docs/binary-client-protocol-key-value-operations#section-op_cache_get_size CacheGetSize(cache string, binary bool, modes []byte) (int64, error) // CacheRemoveKeys removes entries with given keys, notifying listeners and cache writers. // https://apacheignite.readme.io/docs/binary-client-protocol-key-value-operations#section-op_cache_remove_keys CacheRemoveKeys(cache string, binary bool, keys []interface{}) error // CacheRemoveAll destroys cache with a given name. // https://apacheignite.readme.io/docs/binary-client-protocol-key-value-operations#section-op_cache_remove_all CacheRemoveAll(cache string, binary bool) error // QuerySQL executes an SQL query over data stored in the cluster. The query returns the whole record (key and value). // https://apacheignite.readme.io/docs/binary-client-protocol-sql-operations#section-op_query_sql QuerySQL(cache string, binary bool, data QuerySQLData) (QuerySQLResult, error) // QuerySQLCursorGetPage retrieves the next SQL query cursor page by cursor id from QuerySQL. // https://apacheignite.readme.io/docs/binary-client-protocol-sql-operations#section-op_query_sql_cursor_get_page QuerySQLCursorGetPage(id int64) (QuerySQLPage, error) // QuerySQLFieldsRaw is equal to QuerySQLFields but return raw Response object. // Used for SQL driver to reduce memory allocations. QuerySQLFieldsRaw(cache string, binary bool, data QuerySQLFieldsData) (*ResponseOperation, error) // QuerySQLFields performs SQL fields query. // https://apacheignite.readme.io/docs/binary-client-protocol-sql-operations#section-op_query_sql_fields QuerySQLFields(cache string, binary bool, data QuerySQLFieldsData) (QuerySQLFieldsResult, error) // QuerySQLFieldsCursorGetPageRaw is equal to QuerySQLFieldsCursorGetPage but return raw Response object. // Used for SQL driver to reduce memory allocations. QuerySQLFieldsCursorGetPageRaw(id int64) (*ResponseOperation, error) // QuerySQLFieldsCursorGetPage retrieves the next query result page by cursor id from QuerySQLFields. // https://apacheignite.readme.io/docs/binary-client-protocol-sql-operations#section-op_query_sql_fields_cursor_get_page QuerySQLFieldsCursorGetPage(id int64, fieldCount int) (QuerySQLFieldsPage, error) // QueryScan performs scan query. // https://apacheignite.readme.io/docs/binary-client-protocol-sql-operations#section-op_query_scan QueryScan(cache string, binary bool, data QueryScanData) (QueryScanResult, error) // QueryScanCursorGetPage fetches the next SQL query cursor page by cursor id that is obtained from OP_QUERY_SCAN. // https://apacheignite.readme.io/docs/binary-client-protocol-sql-operations#section-op_query_scan_cursor_get_page QueryScanCursorGetPage(id int64) (QueryScanPage, error) // ResourceClose closes a resource, such as query cursor. // https://apacheignite.readme.io/docs/binary-client-protocol-sql-operations#section-op_resource_close ResourceClose(id int64) error }
Client is interface to communicate with Apache Ignite cluster. Client is thread safe.
type ComplexObject ¶ added in v0.8.0
ComplexObject is "complex object" type
func NewComplexObject ¶ added in v0.8.0
func NewComplexObject(typeName string) ComplexObject
NewComplexObject is constructor for ComplexObject
func ReadComplexObject ¶ added in v0.8.0
func ReadComplexObject(r io.Reader) (ComplexObject, error)
ReadComplexObject reads "complex object" value
func (*ComplexObject) Get ¶ added in v0.8.0
func (c *ComplexObject) Get(field string) (interface{}, bool)
Get gets field value
func (*ComplexObject) Set ¶ added in v0.8.0
func (c *ComplexObject) Set(field string, value interface{})
Set sets field value
type ConnInfo ¶
type ConnInfo struct {
Network, Host string
Port int
Major, Minor, Patch int
Username, Password string
Dialer net.Dialer
TLSConfig *tls.Config
}
ConnInfo contains connections parameters
type Date ¶
type Date int64
Date is Unix time, the number of MILLISECONDS elapsed since January 1, 1970 UTC.
type FieldNameAlias ¶
FieldNameAlias is struct
type QueryEntity ¶
type QueryEntity struct { KeyTypeName string ValueTypeName string TableName string KeyFieldName string ValueFieldName string QueryFields []QueryField FieldNameAliases []FieldNameAlias QueryIndexes []QueryIndex }
QueryEntity is struct
type QueryField ¶
type QueryField struct { Name string TypeName string IsKeyField bool IsNotNullConstraintField bool }
QueryField is struct
type QueryIndex ¶
QueryIndex is struct
type QuerySQLData ¶
type QuerySQLData struct { // Name of a type or SQL table. Table string // SQL query string. Query string // Query arguments. QueryArgs []interface{} // Distributed joins. DistributedJoins bool // Local query. LocalQuery bool // Replicated only - Whether query contains only replicated tables or not. ReplicatedOnly bool // Cursor page size. PageSize int // Timeout(milliseconds) value should be non-negative. Zero value disables timeout. Timeout int64 }
QuerySQLData input parameter for QuerySQL func
type QuerySQLFieldsData ¶
type QuerySQLFieldsData struct { // Schema for the query; can be empty, in which case default PUBLIC schema will be used. Schema string // Query cursor page size. PageSize int // Max rows. MaxRows int // SQL query string. Query string // Query arguments. QueryArgs []interface{} // Statement type. // ANY = 0 // SELECT = 1 // UPDATE = 2 StatementType byte // Distributed joins. DistributedJoins bool // Local query. LocalQuery bool // Replicated only - Whether query contains only replicated tables or not. ReplicatedOnly bool // Enforce join order. EnforceJoinOrder bool // Collocated - Whether your data is co-located or not. Collocated bool // Lazy query execution. LazyQuery bool // Timeout(milliseconds) value should be non-negative. Zero value disables timeout. Timeout int64 // Include field names. IncludeFieldNames bool }
QuerySQLFieldsData input parameter for QuerySQLFields func
type QuerySQLFieldsPage ¶
type QuerySQLFieldsPage struct { // Values Rows [][]interface{} // Indicates whether more results are available to be fetched with QuerySQLFieldsCursorGetPage. // When true, query cursor is closed automatically. HasMore bool }
QuerySQLFieldsPage is query result page
type QuerySQLFieldsResult ¶
type QuerySQLFieldsResult struct { // Cursor id. Can be closed with ResourceClose func. ID int64 // Field (column) count. FieldCount int // Needed only when IncludeFieldNames is true in the request. // Column names. Fields []string // Query result first page QuerySQLFieldsPage }
QuerySQLFieldsResult output from QuerySQLFields func
type QuerySQLPage ¶
type QuerySQLPage struct { // Key -> Values Rows map[interface{}]interface{} // Indicates whether more results are available to be fetched with QuerySQLCursorGetPage. // When true, query cursor is closed automatically. HasMore bool }
QuerySQLPage is query result page
type QuerySQLResult ¶
type QuerySQLResult struct { // Cursor id. Can be closed with ResourceClose func. ID int64 // Query result first page QuerySQLPage }
QuerySQLResult output from QuerySQL func
type QueryScanData ¶ added in v0.9.0
type QueryScanData struct { // Cursor page size. PageSize int // Number of partitions to query (negative to query entire cache). Partitions int // Local flag - whether this query should be executed on local node only. LocalQuery bool }
QueryScanData input parameter for QueryScan func
type QueryScanPage ¶ added in v0.9.0
type QueryScanPage struct { // Key -> Values Rows map[interface{}]interface{} // Indicates whether more results are available to be fetched with QueryScanCursorGetPage. // When true, query cursor is closed automatically. HasMore bool }
QueryScanPage is query result page
type QueryScanResult ¶ added in v0.9.0
type QueryScanResult struct { // Cursor id. Can be closed with ResourceClose func. ID int64 // Query result first page QueryScanPage }
QueryScanResult output from QueryScan func
type Request ¶
type Request interface { // WriteTo is function to write request data to io.Writer. // Returns written bytes. WriteTo(w io.Writer) (int64, error) }
Request is interface of base message request functionality
type RequestCacheCreateWithConfiguration ¶
type RequestCacheCreateWithConfiguration struct { Count int16 RequestOperation }
RequestCacheCreateWithConfiguration is struct to store operation request
func NewRequestCacheCreateWithConfiguration ¶
func NewRequestCacheCreateWithConfiguration(code int16) *RequestCacheCreateWithConfiguration
NewRequestCacheCreateWithConfiguration creates new handshake request object
func (*RequestCacheCreateWithConfiguration) Write ¶ added in v0.8.0
Write writes len(p) bytes from p to the underlying data stream. It returns the number of bytes written from p (0 <= n <= len(p)) and any error encountered that caused the write to stop early. Write must return a non-nil error if it returns n < len(p). Write must not modify the slice data, even temporarily.
Implementations must not retain p.
type RequestHandshake ¶
type RequestHandshake struct {
// contains filtered or unexported fields
}
RequestHandshake is struct handshake request
func NewRequestHandshake ¶
func NewRequestHandshake(major, minor, patch int, username, password string) *RequestHandshake
NewRequestHandshake creates new handshake request object
func (*RequestHandshake) Write ¶ added in v0.8.0
Write writes len(p) bytes from p to the underlying data stream. It returns the number of bytes written from p (0 <= n <= len(p)) and any error encountered that caused the write to stop early. Write must return a non-nil error if it returns n < len(p). Write must not modify the slice data, even temporarily.
Implementations must not retain p.
type RequestOperation ¶
RequestOperation is struct to store operation request
func NewRequestOperation ¶
func NewRequestOperation(code int16) *RequestOperation
NewRequestOperation creates new handshake request object
func (*RequestOperation) Write ¶ added in v0.8.0
Write writes len(p) bytes from p to the underlying data stream. It returns the number of bytes written from p (0 <= n <= len(p)) and any error encountered that caused the write to stop early. Write must return a non-nil error if it returns n < len(p). Write must not modify the slice data, even temporarily.
Implementations must not retain p.
type Response ¶
type Response interface { // ReadFrom is function to read request data from io.Reader. // Returns read bytes. ReadFrom(r io.Reader) (int64, error) }
Response is interface of base message response functionality
type ResponseHandshake ¶
type ResponseHandshake struct { // Success flag Success bool // Server version major, minor, patch Major, Minor, Patch int // Error message Message string // contains filtered or unexported fields }
ResponseHandshake is struct handshake response
func (*ResponseHandshake) Read ¶ added in v0.8.0
Read reads up to len(p) bytes into p. It returns the number of bytes read (0 <= n <= len(p)) and any error encountered. Even if Read returns n < len(p), it may use all of p as scratch space during the call. If some data is available but not len(p) bytes, Read conventionally returns what is available instead of waiting for more.
type ResponseOperation ¶
type ResponseOperation struct { // Request id UID int64 // Status code (0 for success, otherwise error code) Status int32 // Error message (present only when status is not 0) Message string // contains filtered or unexported fields }
ResponseOperation is struct operation response
func NewResponseOperation ¶
func NewResponseOperation(uid int64) *ResponseOperation
NewResponseOperation is ResponseOperation constructor
func (*ResponseOperation) CheckStatus ¶
func (r *ResponseOperation) CheckStatus() error
CheckStatus checks status of operation execution. Returns: nil in case of success. error object in case of operation failed.
func (*ResponseOperation) Read ¶ added in v0.8.0
Read reads up to len(p) bytes into p. It returns the number of bytes read (0 <= n <= len(p)) and any error encountered. Even if Read returns n < len(p), it may use all of p as scratch space during the call. If some data is available but not len(p) bytes, Read conventionally returns what is available instead of waiting for more.