Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Endpoint ¶
type Endpoint struct { Backend *url.URL Config *config.EndpointConfig }
Endpoint data type A slice of instances of this type comprise the entire gateway
func NewEndpoint ¶
func NewEndpoint(conf *config.EndpointConfig) Endpoint
NewEndpoint creates an instance of type Endpoint and initiates it with the necessary configuration
type Gateway ¶
type Gateway struct { Router *httprouter.Router Config *config.Config Endpoints []*Endpoint }
Gateway type encapsulates all data, config and methods required for the API gteway to function. If using Hodor as a library in your own go project, just import the gateway package and create an instance of type Gateway. Then call the Build and Start methods on that instance to start using the gateway.
Click to show internal directories.
Click to hide internal directories.