demo

package
v0.6.123 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 12 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package demo installs the example's cross-service binding and event rule through the public console API. It is shared by the setup command and the two-replica conformance test.

Index

Constants

View Source
const (
	Binding = `` /* 179-byte string literal not displayed */

	Rule = `` /* 197-byte string literal not displayed */

	RuleName = "hello-to-formatter"
)

The example's definitions, as the console's YAML editor shows them.

Variables

View Source
var (
	ErrURL      = errors.New("console URL must be http(s)")
	ErrLogin    = errors.New("console login failed")
	ErrProtocol = errors.New("unexpected console response")
)
View Source
var ErrDefinition = errors.New("example definition rejected")

Functions

func Connect

func Connect(ctx context.Context, base, token string) (*wsrpc.ClientConn, error)

Connect authenticates using a deployment-provided token, then opens the console's ws-proto transport using the returned HttpOnly session cookie. base includes the console prefix, e.g. http://localhost:8081/backplane.

func Install

func Install(ctx context.Context, call Call) (string, error)

Install saves the example binding and creates or updates its named rule. Re-running records new versions but never adds another active example rule.

Types

type Call

Call is a unary console RPC.

func Unary

func Unary(conn *wsrpc.ClientConn) Call

Unary adapts a ws-proto connection to Install's call contract.

Directories

Path Synopsis
cmd
bind command
Command bind saves binding definitions (YAML files, as the console's editor shows them) through the console API: a scriptable Wiring save for development stacks.
Command bind saves binding definitions (YAML files, as the console's editor shows them) through the console API: a scriptable Wiring save for development stacks.
setup command
setup connects hello and formatter using the console API.
setup connects hello and formatter using the console API.

Jump to

Keyboard shortcuts

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