websocket

package
v0.1.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ResultTmpl = `` /* 379-byte string literal not displayed */

)

Functions

This section is empty.

Types

type WebSocketBuilder

type WebSocketBuilder struct {
	Conn *websocket.Conn
	// contains filtered or unexported fields
}

func NewBuilder

func NewBuilder() *WebSocketBuilder

func (*WebSocketBuilder) CreateTask

func (builder *WebSocketBuilder) CreateTask(configArgs *config.ProtoConfigArgs) (string, error)

func (*WebSocketBuilder) Destroy added in v0.1.1

func (builder *WebSocketBuilder) Destroy(obj interface{}) error

func (*WebSocketBuilder) Done

func (builder *WebSocketBuilder) Done(total time.Duration) (interface{}, error)

func (*WebSocketBuilder) Init

func (builder *WebSocketBuilder) Init(ctx context.Context, taskReq *pb.ExecuteTaskRequest) error

func (*WebSocketBuilder) Merge

func (builder *WebSocketBuilder) Merge(messages []string) (interface{}, error)

func (*WebSocketBuilder) PostRequest

func (builder *WebSocketBuilder) PostRequest(result interface{}) error

func (*WebSocketBuilder) PreRequest

func (builder *WebSocketBuilder) PreRequest(taskReq *pb.ExecuteTaskRequest) (interface{}, interface{})

func (*WebSocketBuilder) Request

func (builder *WebSocketBuilder) Request(ctx context.Context, obj interface{}, taskReq *pb.ExecuteTaskRequest) interface{}

func (*WebSocketBuilder) Split

func (builder *WebSocketBuilder) Split(request *pb.ExecuteTaskRequest, count int) []*pb.ExecuteTaskRequest

type WebsocketStats

type WebsocketStats struct {
	TotalSize      int64             `json:"totalSize,omitempty"`
	Rps            float64           `json:"rps,omitempty"`
	Duration       float64           `json:"duration,omitempty"`
	TotalDuration  float64           `json:"totalDuration,omitempty"`
	Requests       int64             `json:"requests,omitempty"`
	TotalRequests  int64             `json:"totalRequests,omitempty"`
	TotalResponses int64             `json:"totalResponses,omitempty"`
	AvgSize        int64             `json:"avgSize,omitempty"`
	ErrMap         map[string]uint32 `json:"errMap,omitempty"`
}

type WsOptions added in v0.1.1

type WsOptions struct {
	Scheme      string `json:"scheme,omitempty"`
	Host        string `json:"host,omitempty"`
	Path        string `json:"path,omitempty"`
	Requests    int    `json:"requests,omitempty"`
	Concurrency int    `json:"concurrency,omitempty"`
	Timeout     int    `json:"timeout,omitempty"`
	Duration    int    `json:"duration,omitempty"`
	Body        string `json:"body,omitempty"`
	MaxResults  int    `json:"maxResults,omitempty"`
}

WsOptions contains websocket protocol runtime parameters

func NewWsOptions added in v0.1.1

func NewWsOptions() *WsOptions

func (*WsOptions) Validate added in v0.1.1

func (wsOptions *WsOptions) Validate(args []string) error

Jump to

Keyboard shortcuts

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