Documentation
¶
Overview ¶
Package factory provides a factory for creating ExecutionBackend instances from YAML configuration files. This enables no-code agent deployment by allowing backends to be specified purely through configuration.
Index ¶
- Constants
- func LoadFromYAML(path string) (fabric.ExecutionBackend, error)
- func NewBackend(config *loomv1.BackendConfig) (fabric.ExecutionBackend, error)
- func NewMCPBackendWithClient(config *loomv1.BackendConfig, mcpClient mcp.MCPClient) (fabric.ExecutionBackend, error)
- type FileBackend
- func (b *FileBackend) Capabilities() *fabric.Capabilities
- func (b *FileBackend) Close() error
- func (b *FileBackend) ExecuteCustomOperation(ctx context.Context, op string, params map[string]interface{}) (interface{}, error)
- func (b *FileBackend) ExecuteQuery(ctx context.Context, query string) (*fabric.QueryResult, error)
- func (b *FileBackend) GetMetadata(ctx context.Context, resource string) (map[string]interface{}, error)
- func (b *FileBackend) GetSchema(ctx context.Context, resource string) (*fabric.Schema, error)
- func (b *FileBackend) ListResources(ctx context.Context, filters map[string]string) ([]fabric.Resource, error)
- func (b *FileBackend) Name() string
- func (b *FileBackend) Ping(ctx context.Context) error
- type GenericSQLBackend
- func (b *GenericSQLBackend) Capabilities() *fabric.Capabilities
- func (b *GenericSQLBackend) Close() error
- func (b *GenericSQLBackend) ExecuteCustomOperation(ctx context.Context, op string, params map[string]interface{}) (interface{}, error)
- func (b *GenericSQLBackend) ExecuteQuery(ctx context.Context, query string) (*fabric.QueryResult, error)
- func (b *GenericSQLBackend) GetMetadata(ctx context.Context, resource string) (map[string]interface{}, error)
- func (b *GenericSQLBackend) GetSchema(ctx context.Context, resource string) (*fabric.Schema, error)
- func (b *GenericSQLBackend) ListResources(ctx context.Context, filters map[string]string) ([]fabric.Resource, error)
- func (b *GenericSQLBackend) Name() string
- func (b *GenericSQLBackend) Ping(ctx context.Context) error
- type RESTBackend
- func (b *RESTBackend) Capabilities() *fabric.Capabilities
- func (b *RESTBackend) Close() error
- func (b *RESTBackend) ExecuteCustomOperation(ctx context.Context, op string, params map[string]interface{}) (interface{}, error)
- func (b *RESTBackend) ExecuteQuery(ctx context.Context, query string) (*fabric.QueryResult, error)
- func (b *RESTBackend) GetMetadata(ctx context.Context, resource string) (map[string]interface{}, error)
- func (b *RESTBackend) GetSchema(ctx context.Context, resource string) (*fabric.Schema, error)
- func (b *RESTBackend) ListResources(ctx context.Context, filters map[string]string) ([]fabric.Resource, error)
- func (b *RESTBackend) Name() string
- func (b *RESTBackend) Ping(ctx context.Context) error
Constants ¶
View Source
const ( // DefaultRESTTimeout is the default timeout for REST API requests DefaultRESTTimeout = 30 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func LoadFromYAML ¶
func LoadFromYAML(path string) (fabric.ExecutionBackend, error)
LoadFromYAML loads a backend from a YAML configuration file
func NewBackend ¶
func NewBackend(config *loomv1.BackendConfig) (fabric.ExecutionBackend, error)
NewBackend creates a backend from a proto config
func NewMCPBackendWithClient ¶
func NewMCPBackendWithClient(config *loomv1.BackendConfig, mcpClient mcp.MCPClient) (fabric.ExecutionBackend, error)
NewMCPBackendWithClient creates an MCP backend with provided client
Types ¶
type FileBackend ¶
type FileBackend struct {
// contains filtered or unexported fields
}
FileBackend provides a simple file-based backend
func (*FileBackend) Capabilities ¶
func (b *FileBackend) Capabilities() *fabric.Capabilities
func (*FileBackend) Close ¶
func (b *FileBackend) Close() error
func (*FileBackend) ExecuteCustomOperation ¶
func (*FileBackend) ExecuteQuery ¶
func (b *FileBackend) ExecuteQuery(ctx context.Context, query string) (*fabric.QueryResult, error)
func (*FileBackend) GetMetadata ¶
func (*FileBackend) ListResources ¶
func (*FileBackend) Name ¶
func (b *FileBackend) Name() string
type GenericSQLBackend ¶
type GenericSQLBackend struct {
// contains filtered or unexported fields
}
GenericSQLBackend provides a generic SQL database backend implementation
func (*GenericSQLBackend) Capabilities ¶
func (b *GenericSQLBackend) Capabilities() *fabric.Capabilities
func (*GenericSQLBackend) Close ¶
func (b *GenericSQLBackend) Close() error
func (*GenericSQLBackend) ExecuteCustomOperation ¶
func (*GenericSQLBackend) ExecuteQuery ¶
func (b *GenericSQLBackend) ExecuteQuery(ctx context.Context, query string) (*fabric.QueryResult, error)
func (*GenericSQLBackend) GetMetadata ¶
func (*GenericSQLBackend) ListResources ¶
func (*GenericSQLBackend) Name ¶
func (b *GenericSQLBackend) Name() string
type RESTBackend ¶
type RESTBackend struct {
// contains filtered or unexported fields
}
RESTBackend provides a REST API backend
func (*RESTBackend) Capabilities ¶
func (b *RESTBackend) Capabilities() *fabric.Capabilities
func (*RESTBackend) Close ¶
func (b *RESTBackend) Close() error
func (*RESTBackend) ExecuteCustomOperation ¶
func (*RESTBackend) ExecuteQuery ¶
func (b *RESTBackend) ExecuteQuery(ctx context.Context, query string) (*fabric.QueryResult, error)
func (*RESTBackend) GetMetadata ¶
func (*RESTBackend) ListResources ¶
func (*RESTBackend) Name ¶
func (b *RESTBackend) Name() string
Click to show internal directories.
Click to hide internal directories.