amp_control

package
v0.0.0-...-c8b15d8 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2018 License: MIT Imports: 4 Imported by: 4

Documentation

Index

Constants

View Source
const (
	CodeRedirectStream = protocols.Code(17 + iota)
	CodePauseStream
	CodeResumeStream
)

Variables

View Source
var (
	Protocol     *ampControlProtocol
	MiniProtocol = protocols.NewMiniProtocol(Protocol)
)

Functions

func RegisterServer

func RegisterServer(server *protocols.Server, handler Handler) error

Types

type Client

type Client struct {
	protocols.Client
}

func NewClient

func NewClient(client protocols.Client) (*Client, error)

func NewClientFor

func NewClientFor(server_addr string) (*Client, error)

func (*Client) RedirectStream

func (client *Client) RedirectStream(oldHost string, oldPort int, newHost string, newPort int) error

type Handler

type Handler interface {
	StopServer()
	RedirectStream(val *RedirectStream) error
	PauseStream(val *PauseStream) error
	ResumeStream(val *ResumeStream) error
}

type PauseStream

type PauseStream struct {
	amp.ClientDescription
}

type RedirectStream

type RedirectStream struct {
	OldClient amp.ClientDescription
	NewClient amp.ClientDescription
}

type ResumeStream

type ResumeStream struct {
	amp.ClientDescription
}

Jump to

Keyboard shortcuts

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