Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Key ¶ added in v0.5.0
type Key []byte
func NewKeyFromRequest ¶ added in v0.5.0
NewKeyFromRequest creates a routing key from an HTTP request.
func NewKeyFromURL ¶ added in v0.5.0
NewKeyFromURL creates a routing key from a URL.
type Table ¶
type Table interface {
util.HealthChecker
HasSynced() bool
Route(req *http.Request) *httpv1beta1.InterceptorRoute
Signal()
Start(ctx context.Context) error
}
type TableMemory ¶ added in v0.5.0
type TableMemory struct {
// contains filtered or unexported fields
}
TableMemory is an immutable routing table.
func NewTableMemory ¶ added in v0.5.0
func NewTableMemory() *TableMemory
NewTableMemory creates an empty TableMemory.
func (*TableMemory) Remember ¶ added in v0.5.0
func (tm *TableMemory) Remember(ir *httpv1beta1.InterceptorRoute) *TableMemory
Remember adds an InterceptorRoute and returns a new TableMemory. Duplicates are not detected and existing entries are not updated.
func (*TableMemory) Route ¶ added in v0.5.0
func (tm *TableMemory) Route(hostname, path string, headers http.Header) *httpv1beta1.InterceptorRoute
Route finds an InterceptorRoute matching hostname, path and headers. Tries exact match first the hostname, then filter by headers and find the most specific match then it moves to wildcards with similar header matching rule, finally catch-all.
Click to show internal directories.
Click to hide internal directories.