Documentation ¶
Index ¶
- Constants
- type Management
- type State
- func (c *State) GetGatewayPort() string
- func (c *State) GetRuntimePath() string
- func (c *State) GetWWWPath() string
- func (c *State) OnGatewayPortChange(f func(string) error)
- func (c *State) SetGatewayPort(port string) (err error)
- func (c *State) SetRuntimePath(path string) error
- func (c *State) SetWWWPath(path string) error
Constants ¶
View Source
const RoutesFile = "routes.json"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Management ¶
type Management struct { State *State // contains filtered or unexported fields }
func NewManagementService ¶
func NewManagementService(state *State) *Management
func (*Management) CreateRoute ¶
func (g *Management) CreateRoute(route *model.Route) error
func (*Management) GetGatewayPort ¶
func (g *Management) GetGatewayPort() string
func (*Management) GetProxy ¶
func (g *Management) GetProxy(path string) *httputil.ReverseProxy
func (*Management) GetRoutes ¶
func (g *Management) GetRoutes() []*model.Route
func (*Management) SetGatewayPort ¶
func (g *Management) SetGatewayPort(port string) error
type State ¶
type State struct {
// contains filtered or unexported fields
}
func (*State) GetGatewayPort ¶
func (*State) GetRuntimePath ¶
func (*State) GetWWWPath ¶
func (*State) OnGatewayPortChange ¶
Add func `f` to the stack. The stack of funcs will be called, in reverse order, when there is request to change the port.
func (*State) SetGatewayPort ¶
func (*State) SetRuntimePath ¶
func (*State) SetWWWPath ¶
Click to show internal directories.
Click to hide internal directories.