connect

package
v0.0.0-...-dfa80c7 Latest Latest
Warning

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

Go to latest
Published: May 7, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Server *Server
}

Command represents the command executed by `go run connect_benchmark.go`

func (*Command) ParseFlags

func (cmd *Command) ParseFlags(args ...string) (Options, error)

ParseFlags parses the args into Options.

func (*Command) Run

func (cmd *Command) Run(args ...string) error

Run parses the command arguments and starts the server.

type Options

type Options struct {
	Host               string //default:  localhost
	Port               string //default: :1883
	Username           string
	Password           string
	ConnectionInterval int
	Count              int //number of clients
	CleanSession       bool
	Time               int //timeout
}

Options represents the connect benchmark options

type Server

type Server struct {
	Options Options

	StartAt    time.Time
	FinishedAt time.Time
	// contains filtered or unexported fields
}

Server represents the connect benchmark server.

func (*Server) Run

func (srv *Server) Run(ctx context.Context)

Run starts the server.

Jump to

Keyboard shortcuts

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