Help us shape the future of Go! Take the 2026 Go Developer Survey

postgres

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: MIT Imports: 12 Imported by: 1

Documentation

Overview

Package postgres provides a PostgreSQL backend for agentops using Ent.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts ...agentops.ClientOption) (agentops.Store, error)

New creates a new PostgreSQL store.

Types

type Store

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

Store implements agentops.Store using PostgreSQL with Ent.

func (*Store) Close

func (s *Store) Close() error

Close closes the database connection.

func (*Store) CompleteTask

func (s *Store) CompleteTask(ctx context.Context, id string, opts ...agentops.TaskCompleteOption) error

func (*Store) CompleteToolInvocation

func (s *Store) CompleteToolInvocation(ctx context.Context, id string, opts ...agentops.ToolInvocationCompleteOption) error

func (*Store) CompleteWorkflow

func (s *Store) CompleteWorkflow(ctx context.Context, id string, opts ...agentops.WorkflowCompleteOption) error

func (*Store) EmitEvent

func (s *Store) EmitEvent(ctx context.Context, eventType string, opts ...agentops.EventOption) (*agentops.Event, error)

func (*Store) FailTask

func (s *Store) FailTask(ctx context.Context, id string, failErr error, opts ...agentops.TaskFailOption) error

func (*Store) FailWorkflow

func (s *Store) FailWorkflow(ctx context.Context, id string, failErr error) error

func (*Store) GetEvent

func (s *Store) GetEvent(ctx context.Context, id string) (*agentops.Event, error)

func (*Store) GetHandoff

func (s *Store) GetHandoff(ctx context.Context, id string) (*agentops.Handoff, error)

func (*Store) GetTask

func (s *Store) GetTask(ctx context.Context, id string) (*agentops.Task, error)

func (*Store) GetToolInvocation

func (s *Store) GetToolInvocation(ctx context.Context, id string) (*agentops.ToolInvocation, error)

func (*Store) GetWorkflow

func (s *Store) GetWorkflow(ctx context.Context, id string) (*agentops.Workflow, error)

func (*Store) ListEvents

func (s *Store) ListEvents(ctx context.Context, opts ...agentops.ListOption) ([]*agentops.Event, error)

func (*Store) ListHandoffs

func (s *Store) ListHandoffs(ctx context.Context, opts ...agentops.ListOption) ([]*agentops.Handoff, error)

func (*Store) ListTasks

func (s *Store) ListTasks(ctx context.Context, opts ...agentops.ListOption) ([]*agentops.Task, error)

func (*Store) ListToolInvocations

func (s *Store) ListToolInvocations(ctx context.Context, opts ...agentops.ListOption) ([]*agentops.ToolInvocation, error)

func (*Store) ListWorkflows

func (s *Store) ListWorkflows(ctx context.Context, opts ...agentops.ListOption) ([]*agentops.Workflow, error)

func (*Store) Ping

func (s *Store) Ping(ctx context.Context) error

Ping checks the database connection.

func (*Store) RecordHandoff

func (s *Store) RecordHandoff(ctx context.Context, fromAgentID, toAgentID string, opts ...agentops.HandoffOption) (*agentops.Handoff, error)

func (*Store) RecordToolInvocation

func (s *Store) RecordToolInvocation(ctx context.Context, taskID, agentID, toolName string, opts ...agentops.ToolInvocationOption) (*agentops.ToolInvocation, error)

func (*Store) StartTask

func (s *Store) StartTask(ctx context.Context, workflowID, agentID, name string, opts ...agentops.TaskOption) (*agentops.Task, error)

func (*Store) StartWorkflow

func (s *Store) StartWorkflow(ctx context.Context, name string, opts ...agentops.WorkflowOption) (*agentops.Workflow, error)

func (*Store) UpdateHandoff

func (s *Store) UpdateHandoff(ctx context.Context, id string, opts ...agentops.HandoffUpdateOption) error

func (*Store) UpdateTask

func (s *Store) UpdateTask(ctx context.Context, id string, opts ...agentops.TaskUpdateOption) error

func (*Store) UpdateToolInvocation

func (s *Store) UpdateToolInvocation(ctx context.Context, id string, opts ...agentops.ToolInvocationUpdateOption) error

func (*Store) UpdateWorkflow

func (s *Store) UpdateWorkflow(ctx context.Context, id string, opts ...agentops.WorkflowUpdateOption) error

Jump to

Keyboard shortcuts

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