endpoints

package
v5.0.0-beta01 Latest Latest
Warning

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

Go to latest
Published: May 22, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenEndpoint

func OpenEndpoint(ctx context.Context, urlstr string, secondary ...string) (model.Endpoint, error)

OpenEndpoint opens the Registry identified by the URL given. See the URLOpener documentation in driver subpackages for details on supported URL formats, and https://gocloud.dev/concepts/urls for more information.

func Register

func Register(scheme string, opener interface{})

Types

type OpenURLFunc

type OpenURLFunc func(context.Context, *url.URL, ...*url.URL) (model.Endpoint, error)

OpenURLFunc provides an alternative opener to the interface

type URLMux

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

URLMux is a URL opener multiplexer. It matches the scheme of the URLs against a set of registered schemes and calls the opener that matches the URL's scheme. See https://gocloud.dev/concepts/urls/ for more information.

The zero value is a multiplexer with no registered schemes.

func (*URLMux) OpenEndpoint

func (mux *URLMux) OpenEndpoint(ctx context.Context, urlstr string, secondary ...string) (model.Endpoint, error)

OpenEndpoint calls OpenTopicURL with the URL parsed from urlstr. OpenTopic is safe to call from multiple goroutines.

func (*URLMux) Register

func (mux *URLMux) Register(scheme string, opener interface{})

Register registers the opener with the given scheme. If an opener already exists for the scheme, Register panics.

func (*URLMux) Schemes

func (mux *URLMux) Schemes() []string

Schemes returns a sorted slice of the registered schemes.

func (*URLMux) ValidScheme

func (mux *URLMux) ValidScheme(scheme string) bool

ValidScheme returns true if scheme has been registered.

type URLOpener

type URLOpener interface {
	OpenURL(ctx context.Context, u *url.URL, compose ...*url.URL) (model.Endpoint, error)
}

URLOpener represents types than can open Registries based on a URL. The opener must not modify the URL argument. OpenURL must be safe to call from multiple goroutines.

This interface is generally implemented by types in driver packages.

Directories

Path Synopsis
bus
Package cells provides endpoints for speaking either with a local server using a views.Router (and connecting to the local NATS registry), or a remote Cells server using a GRPC gateway client.
Package cells provides endpoints for speaking either with a local server using a views.Router (and connecting to the local NATS registry), or a remote Cells server using a GRPC gateway client.
transport
Package transport provides a ready to use SDK to use the Cells REST API in Go language.
Package transport provides a ready to use SDK to use the Cells REST API in Go language.
Package file system provides endpoints for reading/writing from/to a local folder
Package file system provides endpoints for reading/writing from/to a local folder
Package index provides a GRPC client for storing information into any tree.NodeProviderClient/tree.NodeReceiverClient service.
Package index provides a GRPC client for storing information into any tree.NodeProviderClient/tree.NodeReceiverClient service.
Package memory provides an in-memory basic implementation of an Endpoint, with nodes stored in a map.
Package memory provides an in-memory basic implementation of an Endpoint, with nodes stored in a map.
Package s3 provides an endpoint for connecting to Amazon S3 or an S3-compatible storage
Package s3 provides an endpoint for connecting to Amazon S3 or an S3-compatible storage
Package snapshot provides fast in-memory or on-file implementations of endpoint for storing snapshots
Package snapshot provides fast in-memory or on-file implementations of endpoint for storing snapshots

Jump to

Keyboard shortcuts

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