Documentation
¶
Index ¶
- type CheckInstallationResult
- type ConnectionParams
- type ConstructDataTables
- func (cdt *ConstructDataTables) AddHeaderNode(link, nodeName string, nodeProperties, nodeData map[string]interface{}, ...) error
- func (cdt *ConstructDataTables) AddInfoNode(link, nodeName string, nodeProperties, nodeData map[string]interface{}, ...) error
- func (cdt *ConstructDataTables) AddJobField(jobKey string, jobLength int, description string) (*JobFieldResult, error)
- func (cdt *ConstructDataTables) AddKB(kbName, description string) error
- func (cdt *ConstructDataTables) AddLinkMount(linkMountName, description string) error
- func (cdt *ConstructDataTables) AddLinkNode(linkName string) error
- func (cdt *ConstructDataTables) AddRPCClientField(rpcClientKey string, queueDepth int, description string) (*RPCClientFieldResult, error)
- func (cdt *ConstructDataTables) AddRPCServerField(rpcServerKey string, queueDepth int, description string) (*RPCServerFieldResult, error)
- func (cdt *ConstructDataTables) AddStatusField(statusKey string, properties map[string]interface{}, description string, ...) (*StatusFieldResult, error)
- func (cdt *ConstructDataTables) AddStreamField(streamKey string, streamLength int, description string) (*StreamFieldResult, error)
- func (cdt *ConstructDataTables) CheckInstallation() error
- func (cdt *ConstructDataTables) Disconnect() error
- func (cdt *ConstructDataTables) LeaveHeaderNode(label, name string) error
- func (cdt *ConstructDataTables) Path() map[string][]string
- func (cdt *ConstructDataTables) SelectKB(kbName string) error
- type ConstructJobTable
- type ConstructKB
- func (ckb *ConstructKB) AddHeaderNode(link, nodeName string, nodeProperties, nodeData map[string]interface{}, ...) error
- func (ckb *ConstructKB) AddInfoNode(link, nodeName string, nodeProperties, nodeData map[string]interface{}, ...) error
- func (ckb *ConstructKB) AddKB(kbName, description string) error
- func (ckb *ConstructKB) AddLinkMount(linkMountName, description string) error
- func (ckb *ConstructKB) AddLinkNode(linkName string) error
- func (ckb *ConstructKB) CheckInstallation() error
- func (ckb *ConstructKB) GetDBObjects() (*sql.DB, *sql.DB)
- func (ckb *ConstructKB) LeaveHeaderNode(label, name string) error
- func (ckb *ConstructKB) SelectKB(kbName string) error
- type ConstructRPCClientTable
- func (crt *ConstructRPCClientTable) AddRPCClientField(rpcClientKey string, queueDepth int, description string) (*RPCClientFieldResult, error)
- func (crt *ConstructRPCClientTable) AdjustQueueLength(specifiedClientPaths []string, specifiedQueueLengths []int) (map[string]QueueAdjustmentClientResult, error)
- func (crt *ConstructRPCClientTable) CheckInstallation() error
- func (crt *ConstructRPCClientTable) RemoveUnspecifiedEntries(specifiedClientPaths []string) (int, error)
- func (crt *ConstructRPCClientTable) RestoreDefaultValues() (int, error)
- type ConstructRPCServerTable
- func (crt *ConstructRPCServerTable) AddRPCServerField(rpcServerKey string, queueDepth int, description string) (*RPCServerFieldResult, error)
- func (crt *ConstructRPCServerTable) AdjustQueueLength(specifiedServerPaths []string, specifiedQueueLengths []int) (map[string]QueueAdjustmentResult, error)
- func (crt *ConstructRPCServerTable) CheckInstallation() error
- func (crt *ConstructRPCServerTable) RemoveUnspecifiedEntries(specifiedServerPaths []string) (int, error)
- func (crt *ConstructRPCServerTable) RestoreDefaultValues() (int, error)
- type ConstructStatusTable
- type ConstructStreamTable
- type JobFieldResult
- type KnowledgeBaseManager
- func (kb *KnowledgeBaseManager) AddKB(kbName string, description string) error
- func (kb *KnowledgeBaseManager) AddLink(parentKB, parentPath, linkName string) error
- func (kb *KnowledgeBaseManager) AddLinkMount(knowledgeBase, path, linkMountName, description string) (string, string, error)
- func (kb *KnowledgeBaseManager) AddNode(kbName, label, name string, properties, data map[string]interface{}, ...) error
- func (kb *KnowledgeBaseManager) Disconnect() error
- type QueueAdjustmentClientResult
- type QueueAdjustmentResult
- type RPCClientFieldResult
- type RPCServerFieldResult
- type StatusFieldResult
- type StreamFieldResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckInstallationResult ¶
type CheckInstallationResult struct { MissingPathsAdded int `json:"missing_paths_added"` NotSpecifiedPathsRemoved int `json:"not_specified_paths_removed"` }
CheckInstallationResult represents the result of check installation
type ConnectionParams ¶
ConnectionParams holds database connection parameters
type ConstructDataTables ¶
type ConstructDataTables struct {
// contains filtered or unexported fields
}
ConstructDataTables combines all table constructors into a single interface
func NewConstructDataTables ¶
func NewConstructDataTables(host string, port int, dbname, user, password, database string) (*ConstructDataTables, error)
NewConstructDataTables creates a new instance with all table constructors
func (*ConstructDataTables) AddHeaderNode ¶
func (cdt *ConstructDataTables) AddHeaderNode(link, nodeName string, nodeProperties, nodeData map[string]interface{}, description string) error
func (*ConstructDataTables) AddInfoNode ¶
func (cdt *ConstructDataTables) AddInfoNode(link, nodeName string, nodeProperties, nodeData map[string]interface{}, description string) error
func (*ConstructDataTables) AddJobField ¶
func (cdt *ConstructDataTables) AddJobField(jobKey string, jobLength int, description string) (*JobFieldResult, error)
func (*ConstructDataTables) AddKB ¶
func (cdt *ConstructDataTables) AddKB(kbName, description string) error
func (*ConstructDataTables) AddLinkMount ¶
func (cdt *ConstructDataTables) AddLinkMount(linkMountName, description string) error
func (*ConstructDataTables) AddLinkNode ¶
func (cdt *ConstructDataTables) AddLinkNode(linkName string) error
func (*ConstructDataTables) AddRPCClientField ¶
func (cdt *ConstructDataTables) AddRPCClientField(rpcClientKey string, queueDepth int, description string) (*RPCClientFieldResult, error)
func (*ConstructDataTables) AddRPCServerField ¶
func (cdt *ConstructDataTables) AddRPCServerField(rpcServerKey string, queueDepth int, description string) (*RPCServerFieldResult, error)
func (*ConstructDataTables) AddStatusField ¶
func (cdt *ConstructDataTables) AddStatusField(statusKey string, properties map[string]interface{}, description string, initialData map[string]interface{}) (*StatusFieldResult, error)
func (*ConstructDataTables) AddStreamField ¶
func (cdt *ConstructDataTables) AddStreamField(streamKey string, streamLength int, description string) (*StreamFieldResult, error)
Delegated methods from table constructors
func (*ConstructDataTables) CheckInstallation ¶
func (cdt *ConstructDataTables) CheckInstallation() error
CheckInstallation checks the installation status of all table components
func (*ConstructDataTables) Disconnect ¶
func (cdt *ConstructDataTables) Disconnect() error
func (*ConstructDataTables) LeaveHeaderNode ¶
func (cdt *ConstructDataTables) LeaveHeaderNode(label, name string) error
func (*ConstructDataTables) Path ¶
func (cdt *ConstructDataTables) Path() map[string][]string
Delegated methods from ConstructKB
func (*ConstructDataTables) SelectKB ¶
func (cdt *ConstructDataTables) SelectKB(kbName string) error
type ConstructJobTable ¶
type ConstructJobTable struct {
// contains filtered or unexported fields
}
ConstructJobTable manages job table operations
func NewConstructJobTable ¶
func NewConstructJobTable(conn *sql.DB, constructKB *ConstructKB, database string) (*ConstructJobTable, error)
NewConstructJobTable creates a new instance of ConstructJobTable
func (*ConstructJobTable) AddJobField ¶
func (cjt *ConstructJobTable) AddJobField(jobKey string, jobLength int, description string) (*JobFieldResult, error)
AddJobField adds a new job field to the knowledge base
func (*ConstructJobTable) CheckInstallation ¶
func (cjt *ConstructJobTable) CheckInstallation() error
CheckInstallation synchronizes the knowledge_base and job_table
type ConstructKB ¶
type ConstructKB struct { *KnowledgeBaseManager // contains filtered or unexported fields }
ConstructKB extends KnowledgeBaseManager with stack-based path management
func NewConstructKB ¶
func NewConstructKB(host string, port int, dbname, user, password, tableName string) (*ConstructKB, error)
NewConstructKB creates a new instance of ConstructKB
func (*ConstructKB) AddHeaderNode ¶
func (ckb *ConstructKB) AddHeaderNode(link, nodeName string, nodeProperties, nodeData map[string]interface{}, description string) error
AddHeaderNode adds a header node to the knowledge base
func (*ConstructKB) AddInfoNode ¶
func (ckb *ConstructKB) AddInfoNode(link, nodeName string, nodeProperties, nodeData map[string]interface{}, description string) error
AddInfoNode adds an info node (non-hierarchical) to the knowledge base
func (*ConstructKB) AddKB ¶
func (ckb *ConstructKB) AddKB(kbName, description string) error
AddKB adds a new knowledge base with path tracking
func (*ConstructKB) AddLinkMount ¶
func (ckb *ConstructKB) AddLinkMount(linkMountName, description string) error
AddLinkMount adds a link mount at the current path
func (*ConstructKB) AddLinkNode ¶
func (ckb *ConstructKB) AddLinkNode(linkName string) error
AddLinkNode adds a link node at the current path
func (*ConstructKB) CheckInstallation ¶
func (ckb *ConstructKB) CheckInstallation() error
CheckInstallation verifies that all paths are properly reset
func (*ConstructKB) GetDBObjects ¶
func (ckb *ConstructKB) GetDBObjects() (*sql.DB, *sql.DB)
GetDBObjects returns both the database connection and a statement (Go doesn't use cursors)
func (*ConstructKB) LeaveHeaderNode ¶
func (ckb *ConstructKB) LeaveHeaderNode(label, name string) error
LeaveHeaderNode leaves a header node, verifying the label and name
func (*ConstructKB) SelectKB ¶
func (ckb *ConstructKB) SelectKB(kbName string) error
SelectKB selects a knowledge base to work with
type ConstructRPCClientTable ¶
type ConstructRPCClientTable struct {
// contains filtered or unexported fields
}
ConstructRPCClientTable manages RPC client table operations
func NewConstructRPCClientTable ¶
func NewConstructRPCClientTable(conn *sql.DB, constructKB *ConstructKB, database string) (*ConstructRPCClientTable, error)
NewConstructRPCClientTable creates a new instance of ConstructRPCClientTable
func (*ConstructRPCClientTable) AddRPCClientField ¶
func (crt *ConstructRPCClientTable) AddRPCClientField(rpcClientKey string, queueDepth int, description string) (*RPCClientFieldResult, error)
AddRPCClientField adds a new RPC client field to the knowledge base
func (*ConstructRPCClientTable) AdjustQueueLength ¶
func (crt *ConstructRPCClientTable) AdjustQueueLength(specifiedClientPaths []string, specifiedQueueLengths []int) (map[string]QueueAdjustmentClientResult, error)
AdjustQueueLength adjusts the number of records for multiple client paths to match their specified queue lengths
func (*ConstructRPCClientTable) CheckInstallation ¶
func (crt *ConstructRPCClientTable) CheckInstallation() error
CheckInstallation synchronizes the knowledge_base and rpc_client_table
func (*ConstructRPCClientTable) RemoveUnspecifiedEntries ¶
func (crt *ConstructRPCClientTable) RemoveUnspecifiedEntries(specifiedClientPaths []string) (int, error)
RemoveUnspecifiedEntries removes entries from rpc_client_table where client_path is not in the specified list
func (*ConstructRPCClientTable) RestoreDefaultValues ¶
func (crt *ConstructRPCClientTable) RestoreDefaultValues() (int, error)
RestoreDefaultValues restores default values for all fields except client_path
type ConstructRPCServerTable ¶
type ConstructRPCServerTable struct {
// contains filtered or unexported fields
}
ConstructRPCServerTable manages RPC server table operations
func NewConstructRPCServerTable ¶
func NewConstructRPCServerTable(conn *sql.DB, constructKB *ConstructKB, database string) (*ConstructRPCServerTable, error)
NewConstructRPCServerTable creates a new instance of ConstructRPCServerTable
func (*ConstructRPCServerTable) AddRPCServerField ¶
func (crt *ConstructRPCServerTable) AddRPCServerField(rpcServerKey string, queueDepth int, description string) (*RPCServerFieldResult, error)
AddRPCServerField adds a new RPC server field to the knowledge base
func (*ConstructRPCServerTable) AdjustQueueLength ¶
func (crt *ConstructRPCServerTable) AdjustQueueLength(specifiedServerPaths []string, specifiedQueueLengths []int) (map[string]QueueAdjustmentResult, error)
AdjustQueueLength adjusts the number of records for multiple server paths to match their specified queue lengths
func (*ConstructRPCServerTable) CheckInstallation ¶
func (crt *ConstructRPCServerTable) CheckInstallation() error
CheckInstallation synchronizes the knowledge_base and rpc_server_table
func (*ConstructRPCServerTable) RemoveUnspecifiedEntries ¶
func (crt *ConstructRPCServerTable) RemoveUnspecifiedEntries(specifiedServerPaths []string) (int, error)
RemoveUnspecifiedEntries removes entries from rpc_server_table where server_path is not in the specified list
func (*ConstructRPCServerTable) RestoreDefaultValues ¶
func (crt *ConstructRPCServerTable) RestoreDefaultValues() (int, error)
RestoreDefaultValues restores default values for all fields except server_path
type ConstructStatusTable ¶
type ConstructStatusTable struct {
// contains filtered or unexported fields
}
ConstructStatusTable manages status table operations
func NewConstructStatusTable ¶
func NewConstructStatusTable(conn *sql.DB, constructKB *ConstructKB, database string) (*ConstructStatusTable, error)
NewConstructStatusTable creates a new instance of ConstructStatusTable
func (*ConstructStatusTable) AddStatusField ¶
func (cst *ConstructStatusTable) AddStatusField(statusKey string, properties map[string]interface{}, description string, initialData map[string]interface{}) (*StatusFieldResult, error)
AddStatusField adds a new status field to the knowledge base
func (*ConstructStatusTable) CheckInstallation ¶
func (cst *ConstructStatusTable) CheckInstallation() (*CheckInstallationResult, error)
CheckInstallation synchronizes the knowledge_base and status_table based on paths
type ConstructStreamTable ¶
type ConstructStreamTable struct {
// contains filtered or unexported fields
}
ConstructStreamTable manages stream table operations with header and info nodes
func NewConstructStreamTable ¶
func NewConstructStreamTable(conn *sql.DB, constructKB *ConstructKB, database string) (*ConstructStreamTable, error)
NewConstructStreamTable creates a new instance of ConstructStreamTable
func (*ConstructStreamTable) AddStreamField ¶
func (cst *ConstructStreamTable) AddStreamField(streamKey string, streamLength int, description string) (*StreamFieldResult, error)
AddStreamField adds a new stream field to the knowledge base
func (*ConstructStreamTable) CheckInstallation ¶
func (cst *ConstructStreamTable) CheckInstallation() error
CheckInstallation synchronizes the knowledge_base and stream_table based on paths
type JobFieldResult ¶
type JobFieldResult struct { Job string `json:"job"` Message string `json:"message"` Properties map[string]interface{} `json:"properties"` Data map[string]interface{} `json:"data"` }
JobFieldResult represents the result of adding a job field
type KnowledgeBaseManager ¶
type KnowledgeBaseManager struct {
// contains filtered or unexported fields
}
KnowledgeBaseManager manages knowledge base operations
func NewKnowledgeBaseManager ¶
func NewKnowledgeBaseManager(tableName string, connParams ConnectionParams) (*KnowledgeBaseManager, error)
NewKnowledgeBaseManager creates a new instance of KnowledgeBaseManager
func (*KnowledgeBaseManager) AddKB ¶
func (kb *KnowledgeBaseManager) AddKB(kbName string, description string) error
AddKB adds a knowledge base entry to the information table
func (*KnowledgeBaseManager) AddLink ¶
func (kb *KnowledgeBaseManager) AddLink(parentKB, parentPath, linkName string) error
AddLink adds a link between nodes
func (*KnowledgeBaseManager) AddLinkMount ¶
func (kb *KnowledgeBaseManager) AddLinkMount(knowledgeBase, path, linkMountName, description string) (string, string, error)
AddLinkMount adds a link mount
func (*KnowledgeBaseManager) AddNode ¶
func (kb *KnowledgeBaseManager) AddNode(kbName, label, name string, properties, data map[string]interface{}, path string) error
AddNode adds a node to the knowledge base
func (*KnowledgeBaseManager) Disconnect ¶
func (kb *KnowledgeBaseManager) Disconnect() error
Disconnect closes the database connection
type QueueAdjustmentClientResult ¶
type QueueAdjustmentClientResult struct { Added int `json:"added"` Removed int `json:"removed"` Error string `json:"error,omitempty"` }
QueueAdjustmentClientResult represents the result of queue adjustment for a client path
type QueueAdjustmentResult ¶
type QueueAdjustmentResult struct { Action string `json:"action"` Count int `json:"count"` NewTotal int `json:"new_total"` Error string `json:"error,omitempty"` }
QueueAdjustmentResult represents the result of adjusting a queue
type RPCClientFieldResult ¶
type RPCClientFieldResult struct { RPCClient string `json:"rpc_client"` Message string `json:"message"` Properties map[string]interface{} `json:"properties"` Data string `json:"data"` }
RPCClientFieldResult represents the result of adding an RPC client field
type RPCServerFieldResult ¶
type RPCServerFieldResult struct { Status string `json:"status"` Message string `json:"message"` Properties map[string]interface{} `json:"properties"` Data string `json:"data"` }
RPCServerFieldResult represents the result of adding an RPC server field