Help us shape the future of Go! Take the 2026 Go Developer Survey

routing

package
v0.504.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2025 License: Apache-2.0 Imports: 21 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 New

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 key.Deployment) 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[key.Deployment]

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 *timelineclient.Client) *VerbCallRouter

func NewVerbRouterFromTable

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

func (*VerbCallRouter) Call

func (*VerbCallRouter) LookupClient

func (s *VerbCallRouter) LookupClient(ctx context.Context, module string) (client ftlv1connect.VerbServiceClient, deployment key.Deployment, ok bool)

Jump to

Keyboard shortcuts

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