routing

package
v0.410.1 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallClient

type CallClient interface {
	Call(ctx context.Context, req *connect.Request[ftlv1.CallRequest]) (*connect.Response[ftlv1.CallResponse], error)
}

type RouteTable

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

func (*RouteTable) Current

func (r *RouteTable) Current() RouteView

Current returns the current routes.

func (*RouteTable) Subscribe

func (r *RouteTable) Subscribe() chan string

func (*RouteTable) Unsubscribe

func (r *RouteTable) Unsubscribe(s chan string)

type RouteView

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

func (RouteView) Get

func (r RouteView) Get(deployment model.DeploymentKey) optional.Option[url.URL]

Get returns the URL for the given deployment or None if it doesn't exist.

func (RouteView) GetDeployment

func (r RouteView) GetDeployment(module string) optional.Option[model.DeploymentKey]

GetDeployment returns the deployment key for the given module or None if it doesn't exist.

func (RouteView) GetForModule

func (r RouteView) GetForModule(module string) optional.Option[url.URL]

GetForModule returns the URL for the given module or None if it doesn't exist.

func (RouteView) Schema

func (r RouteView) Schema() *schema.Schema

Schema returns the current schema that the routes are based on.

type VerbCallRouter

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

VerbCallRouter managed clients for the routing service, so calls to a given module can be routed to the correct instance.

func NewVerbRouter

func NewVerbRouter(ctx context.Context, changes schemaeventsource.EventSource, timelineClient *timeline.Client) *VerbCallRouter

func NewVerbRouterFromTable added in v0.410.0

func NewVerbRouterFromTable(ctx context.Context, routeTable *RouteTable, timelineClient *timeline.Client) *VerbCallRouter

func (*VerbCallRouter) Call

func (*VerbCallRouter) LookupClient

func (s *VerbCallRouter) LookupClient(module string) (client ftlv1connect.VerbServiceClient, deployment model.DeploymentKey, ok bool)

Jump to

Keyboard shortcuts

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