Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { FilePath string `json:"file_path"` Server Server `json:"server"` Route Route `json:"route"` }
Config represents structure of MicroProxy config.
var Instance *Config
Instance holds reference of singleton Config
type Destination ¶
type Destination struct { ID string `json:"id"` Host string `json:"host"` URL string `json:"url"` Default bool `json:"default"` }
Destination represents info of the destination node.
type Route ¶
type Route struct { Destinations []Destination `json:"destinations"` Rules []Rule `json:"rules"` }
Route represents info required for forwarding request to multiple destinations, based on the specified rules.
func (*Route) GetDestinationByID ¶
func (r *Route) GetDestinationByID(id string) (*Destination, error)
Click to show internal directories.
Click to hide internal directories.