worker

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2020 License: Apache-2.0 Imports: 9 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 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