client

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2019 License: MIT Imports: 10 Imported by: 5

Documentation

Index

Constants

View Source
const CommandNameClient = "client"

Variables

This section is empty.

Functions

func AddPluginRedirect

func AddPluginRedirect(redirect ServerRedirect)

add a client plugin

Types

type Plugin

type Plugin struct {
	RedirectPlugin ServerRedirect
}

func (*Plugin) HasPlugin

func (plugin *Plugin) HasPlugin() bool

check whether the plugin has been added. this plugin can only be at most one instance.

type ServerRedirect

type ServerRedirect interface {
	// in the plugin, we may add http header and modify remote address.
	BeforeRequest(dialer *websocket.Dialer, url *url.URL, header http.Header) error
}

Jump to

Keyboard shortcuts

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