instill

package
v0.3.0-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(logger *zap.Logger, options ConnectorOptions) base.IConnector

Types

type Client

type Client struct {
	APIKey     string
	HTTPClient HTTPClient
}

Client represents an Instill Model client

type Connection

type Connection struct {
	base.BaseConnection
	// contains filtered or unexported fields
}

func (*Connection) Execute

func (c *Connection) Execute(inputs []*connectorPB.DataPayload) ([]*connectorPB.DataPayload, error)

func (*Connection) GetTask

func (c *Connection) GetTask() (commonPB.Task, error)

func (*Connection) NewClient

func (c *Connection) NewClient() (*Client, error)

NewClient initializes a new Instill model client

func (*Connection) Test

type Connector

type Connector struct {
	base.BaseConnector
	// contains filtered or unexported fields
}

func (*Connector) CreateConnection

func (c *Connector) CreateConnection(defUid uuid.UUID, config *structpb.Struct, logger *zap.Logger) (base.IConnection, error)

type ConnectorOptions

type ConnectorOptions struct{}

type GetModelRes

type GetModelRes struct {
	Model *Model `json:"model"`
}

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient interface

type Model

type Model struct {
	Name            string    `json:"name"`
	UID             string    `json:"uid"`
	ID              string    `json:"id"`
	Description     string    `json:"description"`
	ModelDefinition string    `json:"model_definition"`
	Configuration   any       `json:"configuration"`
	Task            string    `json:"task"`
	State           string    `json:"state"`
	Visibility      string    `json:"visibility"`
	User            string    `json:"user"`
	CreateTime      time.Time `json:"create_time"`
	UpdateTime      time.Time `json:"update_time"`
}

Jump to

Keyboard shortcuts

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