fuse

package module
v0.0.0-...-5ba9dae Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2025 License: MIT Imports: 6 Imported by: 0

README

fuse_go

The Go (Golang) client library for the DeclareData Fuse server.

Important Note: This library is in experimental status. It may be missing features and is expected to change in breaking ways at any time. This message will be removed when this library's status changes.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	fuse.SdsClient
}

func NewClient

func NewClient(host string, port int) (*Client, error)

func (*Client) NewSession

func (c *Client) NewSession(ctx context.Context) (*Session, error)

type Column

type Column interface {
	// Name returns the current name of this column
	Name() string
	// contains filtered or unexported methods
}

type DataFrame

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

func DataFrameFromCSV

func DataFrameFromCSV(ctx context.Context, sess *Session, fileName string) (*DataFrame, error)

func (*DataFrame) Builder

func (d *DataFrame) Builder() DataFrameBuilder

func (*DataFrame) Col

func (d *DataFrame) Col(colName string) *ExistingCol

func (*DataFrame) Collect

func (d *DataFrame) Collect(ctx context.Context) ([]*Row, error)

func (*DataFrame) Select

func (d *DataFrame) Select(ctx context.Context, cols ...Column) (*DataFrame, error)

type DataFrameBuilder

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

DataFrameBuilder is an error-safe construct to connect a series of DataFrame transformations together. Create one of these from an existing DataFrame by calling its Builder() method.

func (DataFrameBuilder) Collect

func (d DataFrameBuilder) Collect(ctx context.Context) ([]*Row, error)

Collect is a convenience function for roughly the following:

df, err := d.Execute(ctx)
if err != nil {
	return nil, fmt.Errorf("collecting: %w", err)
}
return df.Collect(ctx)

func (DataFrameBuilder) Execute

func (d DataFrameBuilder) Execute(ctx context.Context) (*DataFrame, error)

Execute executes all transforms in d and returns the resulting DataFrame. If any transform fails, execution is immediately halted and the error is returned.

func (DataFrameBuilder) Select

func (d DataFrameBuilder) Select(cols ...Column) DataFrameBuilder

Select appends a call to df.Select(ctx, cols) to the end of the set of transforms.

type ExistingCol

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

ExistingCol is a Column implementation that simply references a column that already exists in a DataFrame.

Call either the Col or DataFrame.Col functions to create one of these.

func Col

func Col(name string) *ExistingCol

func (*ExistingCol) Name

func (e *ExistingCol) Name() string

type Row

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

func (*Row) Data

func (r *Row) Data() map[string]*gen.Value

type Session

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

func (*Session) Close

func (s *Session) Close(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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