connector

package
v0.0.0-...-0012dc0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2019 License: Apache-2.0 Imports: 12 Imported by: 2

Documentation

Index

Constants

View Source
const MAJOR_VERSION uint32 = 1
View Source
const MINOR_VERSION uint32 = 1

Variables

This section is empty.

Functions

func DecodeValue

func DecodeValue(value *v1.EncodedValue, ref interface{}) (interface{}, error)

func DecodeValueList

func DecodeValueList(list *v1.EncodedValueList, ref interface{}) ([]interface{}, error)

func EncodeList

func EncodeList(list interface{}) ([]*v1.EncodedValue, error)

func EncodeTable

func EncodeTable(table map[string][]interface{}) (*v1.Table, error)

func EncodeValue

func EncodeValue(val interface{}) (*v1.EncodedValue, error)

func EncodeValueList

func EncodeValueList(list interface{}) (*v1.EncodedValueList, error)

Types

type AuthenticationError

type AuthenticationError string

func (AuthenticationError) Error

func (e AuthenticationError) Error() string

type ConnectionProvider

type ConnectionProvider interface {
	GetGeodeConnection() *GeodeConnection
}

type GeodeConnection

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

func (*GeodeConnection) GetRawConnection

func (this *GeodeConnection) GetRawConnection() net.Conn

type Pool

type Pool struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewPool

func NewPool() *Pool

func (*Pool) AddConnection

func (this *Pool) AddConnection(c net.Conn, handshakeDone bool)

func (*Pool) AddCredentials

func (this *Pool) AddCredentials(username, password string)

func (*Pool) AddLocator

func (this *Pool) AddLocator(host string, port int)

func (*Pool) AddServer

func (this *Pool) AddServer(host string, port int)

func (*Pool) DiscardConnection

func (this *Pool) DiscardConnection(gConn *GeodeConnection)

DiscardConnection is used publicly as it holds the necessary lock

func (*Pool) GetConnection

func (this *Pool) GetConnection() (*GeodeConnection, error)

func (*Pool) ReturnConnection

func (this *Pool) ReturnConnection(gConn *GeodeConnection)

type Protobuf

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

A Protobuf connector provides the low-level interface between a Client and the backend Geode servers. It should not be used directly; rather the Client API should be used.

func NewConnector

func NewConnector(pool *Pool) *Protobuf

func (*Protobuf) ExecuteOnGroups

func (this *Protobuf) ExecuteOnGroups(functionId string, groups []string, functionArgs interface{}) ([]interface{}, error)

func (*Protobuf) ExecuteOnMembers

func (this *Protobuf) ExecuteOnMembers(functionId string, members []string, functionArgs interface{}) ([]interface{}, error)

func (*Protobuf) ExecuteOnRegion

func (this *Protobuf) ExecuteOnRegion(functionId, region string, functionArgs interface{}, keyFilter []interface{}) ([]interface{}, error)

func (*Protobuf) Get

func (this *Protobuf) Get(region string, k interface{}, value interface{}) (interface{}, error)

func (*Protobuf) GetAll

func (this *Protobuf) GetAll(region string, keys interface{}) (map[interface{}]interface{}, map[interface{}]error, error)

func (*Protobuf) Put

func (this *Protobuf) Put(region string, k, v interface{}) (err error)

func (*Protobuf) PutAll

func (this *Protobuf) PutAll(region string, entries interface{}) (map[interface{}]error, error)

func (*Protobuf) PutIfAbsent

func (this *Protobuf) PutIfAbsent(region string, k, v interface{}) (err error)

func (*Protobuf) QueryListResult

func (this *Protobuf) QueryListResult(query *query.Query) ([]interface{}, error)

func (*Protobuf) QuerySingleResult

func (this *Protobuf) QuerySingleResult(query *query.Query) (interface{}, error)

func (*Protobuf) QueryTableResult

func (this *Protobuf) QueryTableResult(query *query.Query) (map[string][]interface{}, error)

func (*Protobuf) Remove

func (this *Protobuf) Remove(region string, k interface{}) error

func (*Protobuf) Size

func (this *Protobuf) Size(r string) (int32, error)

type RetryableError

type RetryableError struct {
	Err error
}

func (*RetryableError) Error

func (e *RetryableError) Error() string

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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