Documentation ¶
Index ¶
- type Accessors
- type Colony
- type ColonyConfig
- type DataNodeContext
- type DataNodePressure
- type FunctionContext
- type Listener
- type PoolConnection
- type PoolContext
- type SchemaContext
- type SequenceContext
- type SettingContext
- type ShardContext
- type ShardPressure
- type TableContext
- type TenantContext
- type TransportWrapper
- type TypeContext
- type UserContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Accessors ¶
type Accessors interface { Shards() ShardContext Tenants() TenantContext DataNodes() DataNodeContext Tables() TableContext Schema() SchemaContext Setting() SettingContext Types() TypeContext Users() UserContext Pool() PoolContext Sequences() SequenceContext }
type Colony ¶
type Colony interface { Accessors Query(string) (*frunk.QueryResponse, error) CoordinatorID() uint64 IsLeader() bool Close() Addr() net.Addr Join(id, addr string) error JoinCluster() error LeaderID() (string, string, error) State() frunk.ClusterState Neighbors() ([]*frunk.Server, error) InitColony(config ColonyConfig, log timber.Logger) error }
Colony is a wrapper for all of the core data that noahdb needs to operate.
type ColonyConfig ¶
type DataNodeContext ¶
type DataNodeContext interface { GetDataNode(id uint64) (DataNode, error) GetDataNodes() ([]DataNode, error) GetDataNodesForShard(uint64) ([]DataNode, error) GetDataNodeForDataNodeShard(uint64) (DataNode, error) GetRandomDataNodeShardID() (uint64, error) GetDataNodeShardIDs() ([]uint64, error) GetDataNodeShardIDsForShard(uint64) ([]uint64, error) NewDataNode(address string, port int32, user string, password string) (DataNode, error) }
type DataNodePressure ¶
type FunctionContext ¶
type FunctionContext interface { }
type Listener ¶
type Listener interface { net.Listener Dial(address string, timeout time.Duration) (net.Conn, error) }
Listener is the interface Raft-compatible network layers should implement.
type PoolConnection ¶
type PoolConnection interface { Release() ID() uint64 // contains filtered or unexported methods }
type PoolContext ¶
type PoolContext interface { StartPool() GetConnectionForDataNodeShard(id uint64) (PoolConnection, error) }
type SchemaContext ¶
type SequenceContext ¶
type SequenceContext interface {
GetSequenceChunk(name string) (*frunk.SequenceChunkResponse, error)
}
type SettingContext ¶
type ShardContext ¶
type ShardContext interface { NewShard() (Shard, error) GetShards() ([]Shard, error) GetDataNodeShards() ([]DataNodeShard, error) GetWriteDataNodeShards(uint64) ([]DataNodeShard, error) BalanceOrphanShards() error GetDataNodesPressure(max int) ([]DataNodePressure, error) GetShardPressures(max int) ([]ShardPressure, error) }
ShardContext is just a wrapper interface for shard metadata.
type ShardPressure ¶
type TableContext ¶
type TableContext interface { NewTable(table Table, columns []Column) (Table, []Column, error) NextSequenceID(table Table, column Column) (uint64, error) GetTable(name string) (Table, bool, error) GetTables(...string) ([]Table, error) GetColumns(tableId uint64) ([]Column, error) GetPrimaryKeyColumnByName(name string) (Column, bool, error) GetSequenceColumnForTable(tableId uint64) (Column, bool, error) GetShardKeyColumnForTable(uint64) (Column, error) GetTablesInSchema(schema string, names ...string) ([]Table, error) GetTenantTable() (Table, bool, error) GetColumnFromTables(column string, tables []string) (Column, bool, error) }
type TenantContext ¶
type TransportWrapper ¶
type TransportWrapper interface { NormalTransport() net.Listener ForwardToRaft(net.Conn, error) ForwardToRpc(net.Conn, error) RaftTransport() Listener RpcTransport() Listener Port() int Addr() net.Addr Close() }
func NewTransportWrapper ¶
func NewTransportWrapper(listener Listener) TransportWrapper
type TypeContext ¶
type UserContext ¶
type UserContext interface {
GetUsers() ([]User, error)
}
UserContext is just a wrapper interface for user metadata.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.