Documentation
¶
Overview ¶
Package staticroute provides tools for building EC2 Instance Metadata static routes from the set of data endpoints. A data endpoint is an one that serves instance specific data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder map[string]unorderedSet
Builder constructs a set of Route objects. Endpoints added via FromEndpoint will be result in a static route for each level of endpoint nesting. The root route is always an empty string. Endpoints that are descendable will be appended with a slash. For example, adding the endpoint "/foo/bar/baz" will result in the following routes:
"/foo/bar" -> baz "/foo" -> bar/ "" -> foo/
func (Builder) Build ¶
Build returns a slice of Route objects containing an Endpoint and its associated child elements for the response body. The root route is identified by an empty string for the Endpoint field of Route.
func (Builder) FromEndpoint ¶
FromEndpoint adds endpoint to b. endpoint should be of URL path form such as "/foo/bar". FromEndpoint can be called multiple times.