Documentation
¶
Index ¶
- Variables
- func CloseModusDb(ctx context.Context)
- func GetTx(ctx context.Context) (pgx.Tx, error)
- func InitModusDb(ctx context.Context)
- func Initialize(ctx context.Context)
- func Stop(ctx context.Context)
- func UpdateAgentStatus(ctx context.Context, id string, status string) error
- func WithTx(ctx context.Context, fn func(pgx.Tx) error) error
- func WriteAgentState(ctx context.Context, state AgentState) error
- func WriteInferenceHistory(ctx context.Context, model *manifest.ModelInfo, input, output any, ...)
- func WriteInferenceHistoryToDB(ctx context.Context, batch []inferenceHistory)
- func WritePluginInfo(ctx context.Context, plugin *plugins.Plugin)
- type AgentState
- type Inference
- type Plugin
Constants ¶
This section is empty.
Variables ¶
View Source
var GlobalModusDbEngine *modusgraph.Engine
Functions ¶
func CloseModusDb ¶ added in v0.17.0
func InitModusDb ¶ added in v0.17.0
func Initialize ¶
func UpdateAgentStatus ¶ added in v0.18.0
func WriteAgentState ¶ added in v0.18.0
func WriteAgentState(ctx context.Context, state AgentState) error
func WriteInferenceHistory ¶
Types ¶
type AgentState ¶ added in v0.18.0
type AgentState struct { Gid uint64 `json:"gid,omitempty"` Id string `json:"id" db:"constraint=unique"` Name string `json:"name"` Status string `json:"status"` Data string `json:"data,omitempty"` UpdatedAt string `json:"updated"` }
func GetAgentState ¶ added in v0.18.0
func GetAgentState(ctx context.Context, id string) (*AgentState, error)
func QueryActiveAgents ¶ added in v0.18.0
func QueryActiveAgents(ctx context.Context) ([]AgentState, error)
type Inference ¶ added in v0.17.0
type Inference struct { Gid uint64 `json:"gid,omitempty"` Id string `json:"id,omitempty" db:"constraint=unique"` ModelHash string `json:"model_hash,omitempty"` Input string `json:"input,omitempty"` Output string `json:"output,omitempty"` StartedAt string `json:"started_at,omitempty"` DurationMs int64 `json:"duration_ms,omitempty"` Function string `json:"function,omitempty"` Plugin Plugin `json:"plugin"` }
type Plugin ¶ added in v0.17.0
type Plugin struct { Gid uint64 `json:"gid,omitempty"` Id string `json:"id,omitempty" db:"constraint=unique"` Name string `json:"name,omitempty"` Version string `json:"version,omitempty"` Language string `json:"language,omitempty"` SdkVersion string `json:"sdk_version,omitempty"` BuildId string `json:"build_id,omitempty"` BuildTime string `json:"build_time,omitempty"` GitRepo string `json:"git_repo,omitempty"` GitCommit string `json:"git_commit,omitempty"` }
Click to show internal directories.
Click to hide internal directories.