pulsar

package
v2.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	ID                 string        `json:"appid,omitempty"`
	Name               string        `json:"name"`
	Active             bool          `json:"active"`
	BrowserWaitMillis  int           `json:"browser_wait_millis"`
	JobsPerTransaction int           `json:"jobs_per_transaction"`
	DefaultConfig      DefaultConfig `json:"default_config"`
}

Application wraps an NS1 /pulsar/apps/{appid} resource

func NewApplication

func NewApplication(name string) *Application

NewApplication takes a application name and creates a *Application

type BlendMetricWeights

type BlendMetricWeights struct {
	Timestamp int        `json:"timestamp"`
	Weights   []*Weights `json:"weights"`
}

BlendMetricWeights parameter struct

type DefaultConfig

type DefaultConfig struct {
	HTTP                 bool `json:"http"`
	HTTPS                bool `json:"https"`
	RequestTimeoutMillis int  `json:"request_timeout_millis"`
	JobTimeoutMillis     int  `json:"job_timeout_millis"`
	UseXhr               bool `json:"use_xhr"`
	StaticValues         bool `json:"static_values"`
}

DefaultConfig contains configuration parameters for application

type Job added in v2.7.6

type Job struct {
	Customer  int        `json:"customer,omitempty"`
	TypeID    string     `json:"typeid"`
	Name      string     `json:"name"`
	Community bool       `json:"community,omitempty"`
	JobID     string     `json:"jobid,omitempty"`
	AppID     string     `json:"appid"`
	Active    bool       `json:"active"`
	Shared    bool       `json:"shared"`
	Config    *JobConfig `json:"config,omitempty"`
}

Job wraps an NS1 pulsar/apps/{appid}/jobs/{jobid} resource

func NewBBPulsarJob

func NewBBPulsarJob(name string, appid string) *Job

NewBBPulsarJob takes a name and appid and creates a Bulk Beacon Pulsar job (type *PulsarJob)

func NewJSPulsarJob

func NewJSPulsarJob(name string, appid string, host string, urlPath string) *Job

NewJSPulsarJob takes a name, appid, host and urlPath and creates a JavaScript Pulsar job (type *Job)

type JobConfig

type JobConfig struct {
	Host                 *string             `json:"host"`
	URLPath              *string             `json:"url_path"`
	HTTP                 *bool               `json:"http,omitempty"`
	HTTPS                *bool               `json:"https,omitempty"`
	RequestTimeoutMillis *int                `json:"request_timeout_millis,omitempty"`
	JobTimeoutMillis     *int                `json:"job_timeout_millis,omitempty"`
	UseXHR               *bool               `json:"use_xhr,omitempty"`
	StaticValues         *bool               `json:"static_values,omitempty"`
	BlendMetricWeights   *BlendMetricWeights `json:"blend_metric_weights,omitempty"`
}

JobConfig config parameter struct

type Weights

type Weights struct {
	Name         string  `json:"name,omitempty"`
	Weight       int     `json:"weight"`
	DefaultValue float64 `json:"default_value"`
	Maximize     bool    `json:"maximize"`
}

Weights parameter struct

Jump to

Keyboard shortcuts

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