function

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug added in v0.1.2

func Debug(handler func(ctx *FunctionCtx, duckDb *sql.DB, spiceClient *gospice.SpiceClient) error, options ...DebugOption) (*sql.DB, error)

func Run

func Run(handler func(ctx *FunctionCtx, duckDb *sql.DB, spiceClient *gospice.SpiceClient) error)

Types

type DebugOption added in v0.1.2

type DebugOption func(*debugOptions)

func WithApiKey added in v0.1.2

func WithApiKey(apiKey string) DebugOption

func WithBlockHash added in v0.1.2

func WithBlockHash(blockHash string) DebugOption

func WithBlockNumber added in v0.1.2

func WithBlockNumber(blockNumber int64) DebugOption

func WithDataDir added in v0.1.2

func WithDataDir(dataDir string) DebugOption

func WithFirecacheAddress added in v0.1.2

func WithFirecacheAddress(firecacheAddress string) DebugOption

func WithFlightAddress added in v0.1.2

func WithFlightAddress(flightAddress string) DebugOption

func WithInputsDir added in v0.1.2

func WithInputsDir(inputsDir string) DebugOption

func WithOutputDatasetMigration added in v0.1.2

func WithOutputDatasetMigration(migrationSql string) DebugOption

func WithOutputsDir added in v0.1.2

func WithOutputsDir(outputsDir string) DebugOption

func WithPathTrigger added in v0.1.2

func WithPathTrigger(pathTrigger string) DebugOption

type FunctionContextVariables

type FunctionContextVariables struct {
	BlockNumber             int64    `mapstructure:"block_number,omitempty" json:"block_number,omitempty" yaml:"block_number,omitempty"`
	BlockHash               string   `mapstructure:"block_hash,omitempty" json:"block_hash,omitempty" yaml:"block_hash,omitempty"`
	OutputDatasetMigrations []string `` /* 136-byte string literal not displayed */
}

type FunctionCtx

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

func NewFunctionCtx

func NewFunctionCtx(parentCtx context.Context, blockNumber int64, blockHash string) *FunctionCtx

func (*FunctionCtx) BlockHash

func (f *FunctionCtx) BlockHash() string

func (*FunctionCtx) BlockNumber

func (f *FunctionCtx) BlockNumber() int64

func (*FunctionCtx) Deadline

func (f *FunctionCtx) Deadline() (deadline time.Time, ok bool)

func (*FunctionCtx) Done

func (f *FunctionCtx) Done() <-chan struct{}

func (*FunctionCtx) Err

func (f *FunctionCtx) Err() error

func (*FunctionCtx) Value

func (f *FunctionCtx) Value(key interface{}) interface{}

Jump to

Keyboard shortcuts

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