service

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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 NewState

func NewState() *State

func (*State) GetGatewayPort

func (c *State) GetGatewayPort() string

func (*State) GetRuntimePath

func (c *State) GetRuntimePath() string

func (*State) GetWWWPath

func (c *State) GetWWWPath() string

func (*State) OnGatewayPortChange

func (c *State) OnGatewayPortChange(f func(string) error)

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 (c *State) SetGatewayPort(port string) (err error)

func (*State) SetRuntimePath

func (c *State) SetRuntimePath(path string) error

func (*State) SetWWWPath

func (c *State) SetWWWPath(path string) error

Jump to

Keyboard shortcuts

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