Documentation
¶
Index ¶
- Constants
- Variables
- func GetDefaultIPCSocket() string
- func GetDefaultRPCEndpoint() string
- func GetDefaultRPCHostAndPort() (string, uint16)
- type Blob
- type BlobWriter
- func (b *BlobWriter) Build(client *IPCClient) error
- func (b *BlobWriter) Data() ([]byte, error)
- func (b *BlobWriter) Pointer() (unsafe.Pointer, error)
- func (b *BlobWriter) Reset(id types.ObjectID, size uint64, buffer *arrow.Buffer, ...)
- func (b *BlobWriter) Seal(client *IPCClient) (types.ObjectID, error)
- type BufferSet
- func (s *BufferSet) Contains(id types.ObjectID) bool
- func (s *BufferSet) EmplaceBuffer(id types.ObjectID, buffer *arrow.Buffer) error
- func (s *BufferSet) EmplaceBufferId(id types.ObjectID) error
- func (s *BufferSet) Get(id types.ObjectID) (buffer *arrow.Buffer, err error)
- func (s *BufferSet) GetBufferIds() []types.ObjectID
- func (s *BufferSet) GetBuffers() map[types.ObjectID]*arrow.Buffer
- func (s *BufferSet) Reset()
- type ClientBase
- func (c *ClientBase) CreateData(tree map[string]any) (id types.ObjectID, signature types.Signature, instanceID types.InstanceID, ...)
- func (c *ClientBase) Delete(ids []types.ObjectID) error
- func (c *ClientBase) Disconnect()
- func (c *ClientBase) DropBuffer(id types.ObjectID) error
- func (c *ClientBase) DropName(name string) error
- func (c *ClientBase) GetClusterMeta() (map[string]any, error)
- func (c *ClientBase) GetData(ids []types.ObjectID, syncRemote bool, wait bool) (objects []map[string]any, err error)
- func (c *ClientBase) GetName(name string, wait bool) (id types.ObjectID, err error)
- func (c *ClientBase) IncreaseRefCount(ids []types.ObjectID) error
- func (c *ClientBase) Persist(id types.ObjectID) error
- func (c *ClientBase) PutName(id types.ObjectID, name string) error
- func (c *ClientBase) Release(id types.ObjectID) error
- func (c *ClientBase) Seal(id types.ObjectID) error
- func (c *ClientBase) SyncMetaData() error
- type IObject
- type IObjectBuilder
- type IPCClient
- func (c *IPCClient) BuildBuffer(address []byte, size uint64) (types.ObjectID, error)
- func (c *IPCClient) CreateBuffer(size uint64) (blob BlobWriter, err error)
- func (c *IPCClient) CreateMetaData(metadata *ObjectMeta) (id types.ObjectID, err error)
- func (c *IPCClient) GetBuffer(id types.ObjectID, unsafe bool) (Blob, error)
- func (c *IPCClient) GetBuffers(ids []types.ObjectID, unsafe_ bool) (map[types.ObjectID]Blob, error)
- func (c *IPCClient) GetClusterInfo() (map[string]any, error)
- func (c *IPCClient) GetMetaData(id types.ObjectID, syncRemote bool) (meta *ObjectMeta, err error)
- func (c *IPCClient) GetObject(id types.ObjectID, object IObject) error
- func (c *IPCClient) ListMetadata(pattern string, regex bool, limit int) (map[string]map[string]any, error)
- type MmapEntry
- type Object
- type ObjectBase
- type ObjectMeta
- func (m *ObjectMeta) AddKeyValue(key string, value any)
- func (m *ObjectMeta) AddMember(key string, value *ObjectMeta)
- func (m *ObjectMeta) AddMemberId(key string, value types.ObjectID)
- func (m *ObjectMeta) AddMemberObject(key string, value *Object)
- func (m *ObjectMeta) GetBuffer(id types.ObjectID) (*arrow.Buffer, error)
- func (m *ObjectMeta) GetBuffers() *BufferSet
- func (m *ObjectMeta) GetId() (types.ObjectID, error)
- func (m *ObjectMeta) GetInstanceId() (types.InstanceID, error)
- func (m *ObjectMeta) GetKeyValue(key string) (any, error)
- func (m *ObjectMeta) GetKeyValueBool(key string) (bool, error)
- func (m *ObjectMeta) GetKeyValueFloat32(key string) (float32, error)
- func (m *ObjectMeta) GetKeyValueFloat64(key string) (float64, error)
- func (m *ObjectMeta) GetKeyValueInt(key string) (int, error)
- func (m *ObjectMeta) GetKeyValueInt64(key string) (int64, error)
- func (m *ObjectMeta) GetKeyValueString(key string) (string, error)
- func (m *ObjectMeta) GetKeyValueUInt64(key string) (uint64, error)
- func (m *ObjectMeta) GetKeyValueUint(key string) (uint, error)
- func (m *ObjectMeta) GetMember(client *IPCClient, key string, object IObject) error
- func (m *ObjectMeta) GetMemberMeta(key string) (*ObjectMeta, error)
- func (m *ObjectMeta) GetNBytes() (uint64, error)
- func (m *ObjectMeta) GetSignature() (types.Signature, error)
- func (m *ObjectMeta) GetTypeName() (string, error)
- func (m *ObjectMeta) HasKey(key string) bool
- func (m *ObjectMeta) InComplete() bool
- func (m *ObjectMeta) Init()
- func (m *ObjectMeta) IsGlobal() bool
- func (m *ObjectMeta) IsLocal() bool
- func (m *ObjectMeta) IsTransient() bool
- func (m *ObjectMeta) MetaData() map[string]any
- func (m *ObjectMeta) Reset()
- func (m *ObjectMeta) SetGlobal()
- func (m *ObjectMeta) SetId(id types.ObjectID)
- func (m *ObjectMeta) SetInstanceId(id types.InstanceID)
- func (m *ObjectMeta) SetMetaData(client *ClientBase, meta map[string]any)
- func (m *ObjectMeta) SetNBytes(nbytes uint64)
- func (m *ObjectMeta) SetSignature(signature types.Signature)
- func (m *ObjectMeta) SetTransient(transient bool)
- func (m *ObjectMeta) SetTypeName(typeName string)
- type RPCClient
- func (c *RPCClient) CreateMetaData(metadata *ObjectMeta) (id types.ObjectID, err error)
- func (c *RPCClient) GetClusterInfo() (map[string]any, error)
- func (c *RPCClient) GetMetaData(id types.ObjectID, syncRemote bool) (meta *ObjectMeta, err error)
- func (c *RPCClient) ListMetaData(pattern string, regex bool, limit int) (map[string]map[string]any, error)
Constants ¶
View Source
const ( VINEYARD_IPC_SOCKET_KEY = "VINEYARD_IPC_SOCKET" VINEYARD_RPC_ENDPOINT_KEY = "VINEYARD_RPC_ENDPOINT" VINEYARD_DEFAULT_RPC_PORT = 9600 )
Variables ¶
View Source
var NOT_CONNECTED_ERR = common.NotConnected()
Functions ¶
func GetDefaultIPCSocket ¶
func GetDefaultIPCSocket() string
func GetDefaultRPCEndpoint ¶
func GetDefaultRPCEndpoint() string
Types ¶
type BlobWriter ¶
func EmptyBlobWriter ¶
func EmptyBlobWriter(client *IPCClient) BlobWriter
func (*BlobWriter) Build ¶
func (b *BlobWriter) Build(client *IPCClient) error
func (*BlobWriter) Data ¶
func (b *BlobWriter) Data() ([]byte, error)
func (*BlobWriter) Reset ¶
func (b *BlobWriter) Reset( id types.ObjectID, size uint64, buffer *arrow.Buffer, instanceId types.InstanceID, )
type BufferSet ¶
type BufferSet struct {
// contains filtered or unexported fields
}
func (*BufferSet) EmplaceBuffer ¶
func (*BufferSet) GetBufferIds ¶
type ClientBase ¶
type ClientBase struct { IPCSocket string RPCEndpoint string InstanceID types.InstanceID // contains filtered or unexported fields }
func (*ClientBase) CreateData ¶
func (c *ClientBase) CreateData( tree map[string]any, ) (id types.ObjectID, signature types.Signature, instanceID types.InstanceID, err error)
func (*ClientBase) Disconnect ¶
func (c *ClientBase) Disconnect()
func (*ClientBase) DropBuffer ¶
func (c *ClientBase) DropBuffer(id types.ObjectID) error
func (*ClientBase) DropName ¶
func (c *ClientBase) DropName(name string) error
func (*ClientBase) GetClusterMeta ¶
func (c *ClientBase) GetClusterMeta() (map[string]any, error)
func (*ClientBase) IncreaseRefCount ¶
func (c *ClientBase) IncreaseRefCount(ids []types.ObjectID) error
func (*ClientBase) SyncMetaData ¶
func (c *ClientBase) SyncMetaData() error
type IObject ¶
type IObject interface {
Construct(client *IPCClient, meta *ObjectMeta) error
}
type IObjectBuilder ¶
type IPCClient ¶
type IPCClient struct { *ClientBase // contains filtered or unexported fields }
func NewIPCClient ¶
Connect to IPCClient steps as follows
1. using unix socket connect to vineyard server 2. sending register request to server and get response from server
Note: you should send message's length first to server, then send message
func (*IPCClient) BuildBuffer ¶
func (*IPCClient) CreateBuffer ¶
func (c *IPCClient) CreateBuffer(size uint64) (blob BlobWriter, err error)
func (*IPCClient) CreateMetaData ¶
func (c *IPCClient) CreateMetaData(metadata *ObjectMeta) (id types.ObjectID, err error)
func (*IPCClient) GetBuffers ¶
func (*IPCClient) GetMetaData ¶
type Object ¶
type Object struct { Id types.ObjectID Meta *ObjectMeta }
type ObjectBase ¶
type ObjectMeta ¶
type ObjectMeta struct {
// contains filtered or unexported fields
}
func NewObjectMeta ¶
func NewObjectMeta() *ObjectMeta
func (*ObjectMeta) AddKeyValue ¶
func (m *ObjectMeta) AddKeyValue(key string, value any)
func (*ObjectMeta) AddMember ¶
func (m *ObjectMeta) AddMember(key string, value *ObjectMeta)
func (*ObjectMeta) AddMemberId ¶
func (m *ObjectMeta) AddMemberId(key string, value types.ObjectID)
func (*ObjectMeta) AddMemberObject ¶
func (m *ObjectMeta) AddMemberObject(key string, value *Object)
func (*ObjectMeta) GetBuffers ¶
func (m *ObjectMeta) GetBuffers() *BufferSet
func (*ObjectMeta) GetInstanceId ¶
func (m *ObjectMeta) GetInstanceId() (types.InstanceID, error)
func (*ObjectMeta) GetKeyValue ¶
func (m *ObjectMeta) GetKeyValue(key string) (any, error)
func (*ObjectMeta) GetKeyValueBool ¶
func (m *ObjectMeta) GetKeyValueBool(key string) (bool, error)
func (*ObjectMeta) GetKeyValueFloat32 ¶
func (m *ObjectMeta) GetKeyValueFloat32(key string) (float32, error)
func (*ObjectMeta) GetKeyValueFloat64 ¶
func (m *ObjectMeta) GetKeyValueFloat64(key string) (float64, error)
func (*ObjectMeta) GetKeyValueInt ¶
func (m *ObjectMeta) GetKeyValueInt(key string) (int, error)
func (*ObjectMeta) GetKeyValueInt64 ¶
func (m *ObjectMeta) GetKeyValueInt64(key string) (int64, error)
func (*ObjectMeta) GetKeyValueString ¶
func (m *ObjectMeta) GetKeyValueString(key string) (string, error)
func (*ObjectMeta) GetKeyValueUInt64 ¶
func (m *ObjectMeta) GetKeyValueUInt64(key string) (uint64, error)
func (*ObjectMeta) GetKeyValueUint ¶
func (m *ObjectMeta) GetKeyValueUint(key string) (uint, error)
func (*ObjectMeta) GetMember ¶
func (m *ObjectMeta) GetMember(client *IPCClient, key string, object IObject) error
func (*ObjectMeta) GetMemberMeta ¶
func (m *ObjectMeta) GetMemberMeta(key string) (*ObjectMeta, error)
func (*ObjectMeta) GetNBytes ¶
func (m *ObjectMeta) GetNBytes() (uint64, error)
func (*ObjectMeta) GetSignature ¶
func (m *ObjectMeta) GetSignature() (types.Signature, error)
func (*ObjectMeta) GetTypeName ¶
func (m *ObjectMeta) GetTypeName() (string, error)
func (*ObjectMeta) HasKey ¶
func (m *ObjectMeta) HasKey(key string) bool
func (*ObjectMeta) InComplete ¶
func (m *ObjectMeta) InComplete() bool
func (*ObjectMeta) Init ¶
func (m *ObjectMeta) Init()
func (*ObjectMeta) IsGlobal ¶
func (m *ObjectMeta) IsGlobal() bool
func (*ObjectMeta) IsLocal ¶
func (m *ObjectMeta) IsLocal() bool
func (*ObjectMeta) IsTransient ¶
func (m *ObjectMeta) IsTransient() bool
func (*ObjectMeta) MetaData ¶
func (m *ObjectMeta) MetaData() map[string]any
func (*ObjectMeta) Reset ¶
func (m *ObjectMeta) Reset()
func (*ObjectMeta) SetGlobal ¶
func (m *ObjectMeta) SetGlobal()
func (*ObjectMeta) SetId ¶
func (m *ObjectMeta) SetId(id types.ObjectID)
func (*ObjectMeta) SetInstanceId ¶
func (m *ObjectMeta) SetInstanceId(id types.InstanceID)
func (*ObjectMeta) SetMetaData ¶
func (m *ObjectMeta) SetMetaData(client *ClientBase, meta map[string]any)
func (*ObjectMeta) SetNBytes ¶
func (m *ObjectMeta) SetNBytes(nbytes uint64)
func (*ObjectMeta) SetSignature ¶
func (m *ObjectMeta) SetSignature(signature types.Signature)
func (*ObjectMeta) SetTransient ¶
func (m *ObjectMeta) SetTransient(transient bool)
func (*ObjectMeta) SetTypeName ¶
func (m *ObjectMeta) SetTypeName(typeName string)
type RPCClient ¶
type RPCClient struct { *ClientBase // contains filtered or unexported fields }
func NewRPCClient ¶
func (*RPCClient) CreateMetaData ¶
func (c *RPCClient) CreateMetaData(metadata *ObjectMeta) (id types.ObjectID, err error)
func (*RPCClient) GetMetaData ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.