service

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

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)

func (*State) SetGatewayPort

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