ingress

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides a domain-specific client for HttpRoute entities

func NewClient

func NewClient(log *slog.Logger, client rpc.Client) *Client

NewClient creates a new Ingress client from an RPC client

func (*Client) DeleteByHost

func (c *Client) DeleteByHost(ctx context.Context, host string) error

DeleteByHost deletes an http_route by hostname

func (*Client) EnsureSingleDefault

func (c *Client) EnsureSingleDefault(ctx context.Context, routeToKeep *ingress_v1alpha.HttpRoute) error

EnsureSingleDefault removes any default routes but the one specified

func (*Client) List

func (c *Client) List(ctx context.Context) ([]*RouteWithMeta, error)

List returns all http_routes with metadata

func (*Client) Lookup

func (c *Client) Lookup(ctx context.Context, host string) (*ingress_v1alpha.HttpRoute, error)

Lookup finds an http_route by hostname, returns nil if not found

func (*Client) LookupDefault

func (c *Client) LookupDefault(ctx context.Context) (*ingress_v1alpha.HttpRoute, error)

LookupDefault finds the default http_route

func (*Client) SetDefault

func (c *Client) SetDefault(ctx context.Context, appId entity.Id) (*ingress_v1alpha.HttpRoute, error)

SetDefault sets the default route to the provided app

func (*Client) SetRoute

func (c *Client) SetRoute(ctx context.Context, host string, appId entity.Id) (*ingress_v1alpha.HttpRoute, error)

SetRoute creates or updates an http_route for the given host and app

func (*Client) UnsetDefault

func (c *Client) UnsetDefault(ctx context.Context) (*ingress_v1alpha.HttpRoute, error)

UnsetDefault unsets the default route, if any. It returns the route that it unset the default from.

type RouteWithMeta

type RouteWithMeta struct {
	Route     *ingress_v1alpha.HttpRoute
	CreatedAt int64
	UpdatedAt int64
}

RouteWithMeta includes an http_route with its metadata

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL