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 Keys ¶ added in v0.5.0
type Keys []Key
func NewKeysFromHTTPSO ¶ added in v0.5.0
func NewKeysFromHTTPSO(httpso *httpv1alpha1.HTTPScaledObject) Keys
NewKeysFromHTTPSO creates routing keys from an HTTPScaledObject.
type Table ¶
type Table interface {
util.HealthChecker
HasSynced() bool
Route(req *http.Request) *httpv1alpha1.HTTPScaledObject
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 for HTTPScaledObjects.
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(httpso *httpv1alpha1.HTTPScaledObject) *TableMemory
Remember adds an HTTPScaledObject and returns a new TableMemory.
func (*TableMemory) Route ¶ added in v0.5.0
func (tm *TableMemory) Route(hostname, path string, headers http.Header) *httpv1alpha1.HTTPScaledObject
Route finds an HTTPScaledObject 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.