runtime

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnavailable = errors.New("internal runtime unavailable")
	// ErrUnauthenticated marks a shared-secret mismatch between the server
	// and channel processes. It always accompanies ErrUnavailable so
	// availability mapping keeps working, but lets diagnostics distinguish
	// a misconfigured secret from a transient outage.
	ErrUnauthenticated = errors.New("internal runtime authentication failed")
)

Functions

func Public

func Public(err error) error

Public wraps err for verbatim transport across the internal RPC. Public(nil) is nil so handlers can wrap unconditionally.

Types

type Client

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

func NewClient

func NewClient(conn grpc.ClientConnInterface) *Client

func (*Client) Call

func (c *Client) Call(ctx context.Context, method string, input, output any) error

type Handler

type Handler func(context.Context, json.RawMessage) (any, error)

type Server

type Server struct {
	runtimepb.UnimplementedRuntimeServiceServer
	// contains filtered or unexported fields
}

func NewServer

func NewServer(log *slog.Logger, handlers map[string]Handler) *Server

func (*Server) Call

Jump to

Keyboard shortcuts

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