commands

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: May 8, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpCommand

type HttpCommand struct {
	Request  *httpMsg
	Response *httpMsg
	// contains filtered or unexported fields
}

func NewHttpCommand

func NewHttpCommand(method string, url *neturl.URL) *HttpCommand

func (*HttpCommand) AwaitCompletion

func (c *HttpCommand) AwaitCompletion(timeoutInSeconds int) error

If AwaitCompletion returns an error, this means that no HTTP response was received. If an HTTP response is received, and this response has an error code (like 500), AwaitCompletion will not return an error (the HTTP error code is treated like a regular HTTP response). There are a number of reasons why no response is received, for example:

  • Stream error, e.g. RST_STREAM received, illegal stream state, etc.
  • Connection error, e.g. connection closed, timeout, etc.
  • HttpRequest is illegal, e.g. it contains an unsupported HTTP method, etc.

func (*HttpCommand) CompleteSuccessfully

func (c *HttpCommand) CompleteSuccessfully()

func (*HttpCommand) CompleteWithError

func (c *HttpCommand) CompleteWithError(err error)

type MonitoringCommand

type MonitoringCommand struct {
	Result *monitoringCommandResult
	// contains filtered or unexported fields
}

As of now, the "monitoring" is just use to retrieve info about stream states. However, it could be extended to retrieve other info, like available window sizes, response times, etc.

func NewMonitoringCommand

func NewMonitoringCommand() *MonitoringCommand

func (*MonitoringCommand) AwaitCompletion

func (cmd *MonitoringCommand) AwaitCompletion(timeoutInSeconds int) error

func (*MonitoringCommand) CompleteSuccessfully

func (cmd *MonitoringCommand) CompleteSuccessfully()

func (*MonitoringCommand) CompleteWithError

func (cmd *MonitoringCommand) CompleteWithError(err error)

type PingCommand

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

func NewPingCommand

func NewPingCommand() *PingCommand

func (*PingCommand) AwaitCompletion

func (cmd *PingCommand) AwaitCompletion(timeoutInSeconds int) error

func (*PingCommand) CompleteSuccessfully

func (cmd *PingCommand) CompleteSuccessfully()

func (*PingCommand) CompleteWithError

func (cmd *PingCommand) CompleteWithError(err error)

type StreamInfo

type StreamInfo struct {
	StreamId            uint32
	HttpMethod          string
	Path                string
	State               streamstate.StreamState
	IsCachedPushPromise bool
}

Jump to

Keyboard shortcuts

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