demo

package
v0.6.25 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 12 Imported by: 0

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