worker

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CDPSettings

type CDPSettings struct {
	Host string `json:"host"`
	Port uint64 `json:"port"`
}

func (CDPSettings) BaseURL added in v1.1.0

func (s CDPSettings) BaseURL() string

func (CDPSettings) VersionURL added in v1.1.0

func (s CDPSettings) VersionURL() string

type Option

type Option func(opts *Options)

func WithCache added in v1.11.0

func WithCache(cache caching.Cache) Option

func WithCustomCDP

func WithCustomCDP(cdp CDPSettings) Option

func WithFunctions

func WithFunctions(functions core.Functions) Option

func WithoutStdlib

func WithoutStdlib() Option

type Options

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

type Query

type Query struct {
	Text   string                 `json:"text"`
	Params map[string]interface{} `json:"params"`
}

Query is the FQL-script.

type Result

type Result struct {
	Raw []byte
}

Result is the result of Query.

type Worker

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

Worker accepts FQL-script, run it and return result.

func New

func New(setters ...Option) (*Worker, error)

New returns Worker without file system access.

func (*Worker) DoQuery

func (w *Worker) DoQuery(ctx context.Context, query Query) (Result, error)

Jump to

Keyboard shortcuts

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