app

package
v1.12.4 Latest Latest
Warning

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

Go to latest
Published: May 3, 2016 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterApp

func RegisterApp(id ID, creator ForContextCreator)

Types

type Context

type Context interface {
	CallerTag() string
}

Context of a function call from proxy to app.

type ForContextCreator

type ForContextCreator func(Context, interface{}) interface{}

type ID

type ID int

type Space

type Space interface {
	HasApp(ID) bool
	GetApp(ID) interface{}
}

A Space contains all apps that may be available in a V2Ray runtime. Caller must check the availability of an app by calling HasXXX before getting its instance.

type SpaceController

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

A SpaceController is supposed to be used by a shell to create Spaces. It should not be used directly by proxies.

func NewController

func NewController() *SpaceController

func (*SpaceController) Bind

func (this *SpaceController) Bind(id ID, object interface{})

func (*SpaceController) ForContext

func (this *SpaceController) ForContext(tag string) Space

Directories

Path Synopsis
dns

Jump to

Keyboard shortcuts

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