jcode

package module
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: MIT Imports: 20 Imported by: 0

README

Go SDK

The Go SDK is the Go client for the jcode harness API. It speaks protocol v1 over an io.ReadWriteCloser, completes the hello handshake, correlates request replies, and delivers asynchronous events through bounded subscriptions.

Unofficial community fork: This is an independent, vibe-coded fork maintained by Ariel Frischer. It is not an official Jcode release, is not endorsed or supported by the upstream Jcode maintainers, and may be incomplete or incompatible with future Jcode versions. Use it experimentally and review the code before relying on it.

API status: The Go package provides a transport-level client, typed session helpers (CreateSession, AttachSession, Session.Send), typed event streams, and private-instance helpers (Launch, LaunchInstance, and LaunchOptions). Raw Request and Subscribe remain available for forward-compatible protocol additions.

Install

This fork is published as a Go module. Install the tagged release with:

go get github.com/ariel-frischer/jcode-go@v0.1.0

For a source checkout:

git clone https://github.com/ariel-frischer/jcode-go.git
cd jcode-go
go test ./...
go vet ./...

The module requires Go 1.23 or newer. The SDK has no third-party dependencies.

Choose a connection mode

There are two deployment patterns:

  1. Connect to a shared instance. Start jcode api-bridge once, then dial its owner-only Unix socket and pass the connection to NewClient. This is suitable for editor plugins, dashboards, and tools that intentionally operate on the user's live sessions.
  2. Own a private instance. jcode.Launch starts a separately configured bridge/daemon, gives it a separate home and socket, and returns a client that owns shutdown. LaunchInstance is available when the caller needs to control dialing. The Go SDK still does not provide typed session helpers, so protocol requests remain explicit.
Safe-run ownership

Connect is always non-owning. It attaches to an existing runtime, and Client.Close closes only that client's transport. It never stops the shared daemon. Launch is different: the returned client owns the private process, daemon, instance home, and cleanup through its internal Instance handle.

When a worker connection must be allowed to close while the private session continues, transfer the private ownership explicitly:

client, err := jcode.Launch(ctx, jcode.LaunchOptions{JcodeHome: home})
if err != nil { return err }
owner, ok := client.DetachInstance()
if !ok { return errors.New("launch did not return an owned instance") }
_ = client.Close() // transport only; the safe-run owner remains alive
defer owner.Shutdown() // explicit owner shutdown stops the private runtime

This is intentionally opt-in. It does not make arbitrary clients immortal or change shared-runtime shutdown behavior. The owner is responsible for keeping the Instance handle alive and calling Shutdown; shutdown is idempotent. The SDK does not run an implicit infinite supervisor. Reconnect remains explicit and bounded by ReconnectPolicy.MaxAttempts, with reconnect_failed, resume_failed, and reconnected observations exposing attempts and outcomes. In-flight requests are never replayed.

A shared connection sees the user's sessions and actions are visible in their terminal. A private connection must use a distinct state directory and socket. Never point a private process at the user's live jcode home.

Shared connect: one-shot CLI-like flow

Start the bridge first:

jcode api-bridge

Then run examples/oneshot:

go run ./examples/oneshot "List the top-level files"

The example dials $JCODE_API_SOCKET when set, otherwise $XDG_RUNTIME_DIR/jcode-api.sock, creates a session, sends one message, prints text deltas, and exits at turn_done.

The important lifecycle is:

ctx := context.Background()
conn, err := net.Dial("unix", socketPath)
if err != nil { return err }
client, err := jcode.NewClient(ctx, conn, jcode.Options{
    ClientName: "my-tool/1.0",
})
if err != nil { return err } // NewClient closes conn after handshake failure
sub := client.Subscribe(sessionID)
defer sub.Close()
defer client.Close()

NewClient starts its reader goroutine and performs a protocol v1 handshake. Client.Close is idempotent and wakes pending requests and subscriptions.

Typed session lifecycle

Use typed helpers for the common create/send/stream flow:

session, err := client.CreateSession(ctx, jcode.CreateSessionOptions{WorkingDir: workingDir})
if err != nil { return err }
stream := session.Events(ctx)
defer stream.Close()
if err := session.Send(ctx, prompt, jcode.SendOptions{}); err != nil { return err }
for {
    event, err := stream.Next(ctx)
    if err != nil { return err }
    switch value := event.(type) {
    case *jcode.TextDelta:
        io.WriteString(out, value.Text)
    case *jcode.PermissionRequest:
        // Apply an explicit application policy before responding.
    case *jcode.TurnDone:
        return nil
    }
}

AttachSession creates the same lightweight typed view for an existing ID. Session.Send subscribes before notifying the server and waits for the asynchronous message_accepted event. SendOptions.NoReply selects fire-and-forget notification semantics. Session.Send does not retry because a timeout can leave a mutation with an unknown server-side outcome.

create, err := protocol.NewRawRequest("create_session", map[string]any{
    "working_dir": workingDir,
})
if err != nil { return err }
reply, err := client.Request(ctx, create)
if err != nil { return err }

var fields json.RawMessage
if raw, ok := protocol.FieldsJSON(reply.Event); ok {
    fields = raw
} else {
    return errors.New("session creation returned no fields")
}
var sessions struct {
    SessionID string `json:"session_id"`
}
if err := json.Unmarshal(fields, &sessions); err != nil {
    return err
}

The raw request path remains available when an application needs a request or event added by a newer server:

Request waits for the correlated reply or ctx.Done(). Each request also has a 30-second SDK deadline by default, preventing a bridge or daemon that accepts a connection but never replies from hanging a caller indefinitely. Set Options.RequestTimeout to a positive duration to override that bound. Cancellation removes the pending request locally, but it does not necessarily cancel work already accepted by the server. To stop a model turn, send the protocol cancel request for the session.

examples/streaming demonstrates a long-lived service. For a typed stream, use session.Events(ctx) and switch on *TextDelta, *ToolStart, *TokenUsage, *PermissionRequest, and *TurnDone. The lower-level Subscription API remains useful when a service wants raw event fields:

for {
    event, err := sub.Next(ctx)
    if err != nil {
        if errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) {
            return nil
        }
        return err
    }
    switch event.Kind {
    case "text_delta":
        var value struct { Text string `json:"text"` }
        if err := event.Decode(&value); err != nil { return err }
        io.WriteString(out, value.Text)
    case "permission_request":
        // Apply your product's policy. Never blindly allow in an untrusted app.
    case "turn_done":
        return nil
    default:
        // Unknown event kinds are intentionally forward-compatible.
        log.Printf("jcode event kind=%s", event.Kind)
    }
}

Events are delivered to every subscription. A subscription buffer is bounded (Options.EventBuffer, default 128). If a consumer falls behind, that subscription terminates with ErrSubscriberOverflow rather than blocking all request traffic or silently dropping events. Consume promptly, increase the buffer deliberately, or fan out after a single reader. Do not call Next concurrently on one subscription.

Cancellation, shutdown, and reconnect/resume

Use contexts for local deadlines and cancellation:

ctx, cancel := context.WithTimeout(parent, 30*time.Second)
defer cancel()
reply, err := client.Request(ctx, request)

A canceled context only abandons the local wait. For a server-side turn cancellation, send cancel with the session ID and continue consuming events until turn_done or shutdown.

The SDK does not automatically reconnect or replay events. Use Reconnect when you configure a transport.Factory; it retries connection setup according to ReconnectPolicy, and with Resume: true it sends the remembered session ID after the new handshake. In-flight requests are never retried. Persist session IDs in your application and resubscribe after reconnect:

client, err := jcode.NewClient(ctx, conn, jcode.Options{
    SessionID: sessionID,
    Reconnect: jcode.ReconnectPolicy{
        Factory: func(ctx context.Context) (transport.Transport, error) {
            return transport.UnixSocket(socketPath)(ctx)
        },
        MaxAttempts: 5,
        Backoff: 500 * time.Millisecond,
        Resume: true,
    },
})
// After ErrDisconnected:
if err := client.Reconnect(ctx); err != nil { return err }
sub := client.Subscribe(sessionID)

A fresh subscription only receives events from attach onward. Protocol v1 cannot replay events emitted before the new subscription attaches, so use get_history/peek_session after reconnect if your application needs a consistent transcript. Never blindly repeat a mutating request after a timeout or disconnect: its server-side outcome may be unknown.

Errors

Branch on sentinel errors where available, and preserve protocol error code/message fields for diagnostics:

  • ErrClosed: client or transport has closed.
  • ErrSubscriberOverflow: one subscription exceeded its bounded queue.
  • context.Canceled and context.DeadlineExceeded: local caller cancellation/deadline.
  • protocol.ErrMalformedFrame, ErrInvalidFrame, and ErrFrameTooLarge: invalid or unsafe wire data.
  • A protocol.Error event: the harness rejected a request. Its Code is stable; its Message is diagnostic.

Treat timeout, disconnect, and transport failures as unknown-outcome for mutations. Retry idempotent reads only, and refresh session state after reconnect. Keep a default branch for future protocol error codes and event kinds.

Private instance pattern

The Go SDK's Launch owns a private daemon, temporary home, credential policy, and cleanup. Use it when embedding jcode as an agent engine:

inherit := false
client, err := jcode.Launch(ctx, jcode.LaunchOptions{
    WorkingDir:  workingDir,
    InheritLogins: &inherit,
    ClientOptions: jcode.Options{ClientName: "my-service/1.0"},
})
if err != nil { return err }
defer client.Close()

Launch defaults to a temporary owner-only home and removes it on shutdown. Set JcodeHome to persist sessions. LaunchInstance starts the isolated process without dialing it, and its SocketPath() can be passed to net.Dial("unix", ...) and NewClient. Set InheritLogins to a bool pointer whose value is false to avoid copying/linking the user's recognized login files.

When InheritLogins is false, provide provider credentials explicitly through LaunchOptions.Env, for example OPENROUTER_API_KEY. Explicit environment entries replace same-named ambient variables, so API-key-only authentication is deterministic rather than dependent on duplicate environment-key behavior. Startup diagnostics redact explicit values for keys, tokens, and secrets. Never print or persist the credential value yourself, and use per-request context deadlines for Session.Send.

The private example uses the lower-level process/sockets pattern intentionally, which is useful when a service must supervise the child itself. For most applications, prefer jcode.Launch so the SDK owns startup and cleanup. Verify bridge flags for the jcode version you ship before enabling custom supervision. If a private process must use credentials, provision a dedicated service identity instead of inheriting a developer's login files.

Security guidance

  • Unix sockets and runtime directories should be owner-only. Do not change permissions to make a shared socket world-readable.
  • connect operates on the user's live sessions. Treat prompts, file contents, tool inputs, permission requests, and transcripts as sensitive.
  • Do not log raw protocol frames, authorization headers, environment variables, credential paths, prompts, tool arguments, or model output by default. Redact secrets before structured logging.
  • Credential inheritance is powerful and dangerous. A process using the user's bridge or login files can spend their quota and access their sessions. Disable inheritance for untrusted code and use a dedicated account for services.
  • Validate permission requests in application policy. Do not auto-approve tools merely to make an example convenient.
  • Bound frame sizes (Options.MaxFrameSize) and event buffers. Apply request deadlines and avoid unbounded transcript or output retention.
  • Treat the private home as sensitive state. Use a real, dedicated directory, restrict permissions, and remove temporary homes only after the child process has stopped.

Platforms and protocol compatibility

The SDK is pure Go and compiles on platforms supported by Go. The transport support matrix is:

Platform transport.UnixSocket Notes
Linux, macOS, and other Unix-like targets Supported and tested by build Uses the OS Unix-domain socket transport.
Windows Explicitly unsupported Supply a named-pipe/TCP Transport until a named-pipe adapter is added.

The examples are Unix examples and are not expected to run on Windows unchanged. Cross-platform package compilation is covered by the release checks; live transport interoperability remains platform-specific.

The client negotiates protocol major version 1 (protocol.APIVersionMajor == 1). Minor, additive event fields should be decoded permissively. Unknown event kinds are represented as protocol.UnknownEvent; preserve or ignore them rather than failing the whole connection. A major-version mismatch requires upgrading the bridge and SDK together. Go SDK releases are independent package releases, so pin a compatible jcode version in deployment and test the pair.

Troubleshooting

Symptom Likely cause Action
dial unix ...: no such file Bridge is not running or socket path is wrong Run jcode api-bridge; check JCODE_API_SOCKET, XDG_RUNTIME_DIR, and permissions.
Hello handshake fails Wrong socket, incompatible protocol, or non-jcode service Confirm the endpoint is the harness API socket and upgrade both sides.
ErrClosed during a request Bridge/daemon exited or transport was closed Reconnect, then refresh sessions. Do not blindly repeat mutations.
ErrSubscriberOverflow Consumer is slower than event production Consume faster, increase EventBuffer, or fan out from one reader.
No text appears Session is not attached or events are consumed after sending Subscribe/attach before send_message; inspect all event kinds and turn_done.
Permission request blocks Application has not answered the request Apply an explicit allow/deny policy and send the corresponding response request.
Private process cannot start Invalid binary, home, socket, or credentials Capture child stderr without logging secrets; verify paths and use a dedicated home.

Migration from exec-based integrations

An exec integration commonly starts jcode, writes prompts to stdin, parses terminal text, and treats process exit as completion. Migrate in stages:

Exec integration Go SDK replacement
exec.Command plus shell/terminal parsing Start jcode api-bridge or a private process, dial its API socket, call NewClient.
Prompt text on stdin Session.Send, or protocol.NewRawRequest("send_message", fields) plus Client.Notify.
Scraping stdout for tokens Subscribe and decode text_delta, tool_*, permission_request, and turn_done.
Killing the child for cancellation Send protocol cancel, then close the client/process during shutdown.
Assuming process exit means success Inspect correlated protocol.Error, turn_done, and transcript/history.
Re-running the whole command after a timeout Reconnect, refresh history, and retry only operations known to be safe.

Keep the old exec path as a fallback while validating parity. Do not run both paths against the same live session unless you intentionally want concurrent actors. Once the SDK path is stable, remove shell quoting and terminal scraping, add explicit deadlines and permission policy, and redact protocol diagnostics before logging.

Examples and compile checks

The three examples are ordinary Go packages and are checked by:

cd sdk/go
gofmt -d .
go test ./...
go vet ./...
go build ./examples/oneshot ./examples/streaming ./examples/private

They require a live jcode bridge only at runtime. go build and go test do not contact a daemon.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrClosed             = errors.New("jcode client closed")
	ErrDisconnected       = errors.New("jcode client disconnected")
	ErrSubscriberOverflow = errors.New("jcode event subscriber fell behind")
	ErrCapability         = errors.New("jcode capability is not supported")
	ErrResume             = errors.New("jcode session resume failed")
)

Functions

func InheritCredentials

func InheritCredentials(fromHome, toHome string) ([]string, error)

InheritCredentials shares rotating auth files and copies mutable config.

func RedactedID

func RedactedID(value string) string

RedactedID can be used by applications to correlate a session without placing the raw identifier in logs.

Types

type Client

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

func Connect

func Connect(ctx context.Context, options ConnectOptions) (*Client, error)

Connect attaches to a running local Jcode harness. It never starts or stops a process, and closing the returned client only closes its socket.

func Launch

func Launch(ctx context.Context, options LaunchOptions) (*Client, error)

Launch starts a private bridge and connects a Client to it. Any failure after the process starts performs best-effort teardown before returning.

func NewClient

func NewClient(ctx context.Context, t transport.Transport, options Options) (*Client, error)

NewClient starts reading from t and completes the protocol hello handshake. The transport is closed if the handshake fails. Reconnect is always explicit.

func (*Client) AttachSession

func (c *Client) AttachSession(ctx context.Context, id string) (Session, error)

func (*Client) Capabilities

func (c *Client) Capabilities() []string

Capabilities returns the server-advertised capabilities in stable order. The returned slice is a copy and may be modified by the caller.

func (*Client) Close

func (c *Client) Close() error

Close is idempotent and wakes all pending requests and subscriptions.

func (*Client) CreateSession

func (c *Client) CreateSession(ctx context.Context, options CreateSessionOptions) (Session, error)

func (*Client) DetachInstance added in v0.1.2

func (c *Client) DetachInstance() (Instance, bool)

DetachInstance transfers ownership of a private runtime from the client to the caller. After a successful detach, closing the client only closes its protocol transport. The returned Instance remains responsible for the private process, daemon, and SDK-owned state until Shutdown is called.

This is the safe-run boundary for applications that let a worker client come and go while a session owner supervises the runtime independently.

func (*Client) Notify added in v0.1.3

func (c *Client) Notify(req protocol.RawRequest) error

Notify writes a request without waiting for a correlated request-level reply. Use this for protocol operations whose result is delivered as an event.

func (*Client) Reconnect

func (c *Client) Reconnect(ctx context.Context) error

Reconnect explicitly reconnects and, when configured, safely reattaches the remembered session. In-flight requests are never retried.

func (*Client) Request

Request sends a raw request. It never retries, preserving caller control for non-idempotent operations such as send_message.

func (*Client) RequestCapability

func (c *Client) RequestCapability(ctx context.Context, capability string, req protocol.RawRequest) (protocol.ServerFrame, error)

RequestCapability sends req only when the server advertised capability. Unlike Request, this performs a local check and never writes an unsupported request to the wire.

func (*Client) RequireCapability

func (c *Client) RequireCapability(capability string) error

RequireCapability returns a stable error before a capability-gated request.

func (*Client) SessionID

func (c *Client) SessionID() string

SessionID returns the caller-selected identity retained across reconnects.

func (*Client) SetSessionID

func (c *Client) SetSessionID(sessionID string)

func (*Client) State

func (c *Client) State() State

func (*Client) Subscribe

func (c *Client) Subscribe(sessionID string) *Subscription

Subscribe receives asynchronous events. A full buffer terminates only that subscription, keeping the reader bounded and other callers live.

func (*Client) Supports

func (c *Client) Supports(capability string) bool

Supports reports whether the server advertised capability.

type ConnectOptions

type ConnectOptions struct {
	SocketPath    string
	ClientOptions Options
}

ConnectOptions controls attaching to an already-running local harness.

type CreateSessionOptions

type CreateSessionOptions struct {
	WorkingDir string
}

type Event

type Event struct {
	Frame  protocol.ServerFrame
	Kind   string
	Fields json.RawMessage
}

Event is a server event with its stable kind and forward-compatible fields.

func (Event) Decode

func (e Event) Decode(value any) error

type Instance

type Instance interface {
	SocketPath() string
	JcodeHome() string
	Shutdown() error
	Close() error
}

LaunchInstance is the ownership handle for a private runtime.

func LaunchInstance

func LaunchInstance(options LaunchOptions) (Instance, error)

LaunchInstance starts an isolated bridge without connecting the protocol client. This is useful when the caller needs to control connection setup.

type LaunchError

type LaunchError struct {
	Code   LaunchErrorCode
	Binary string
	Stderr string
	Err    error
}

LaunchError reports a failure in private-instance startup or connection.

func (*LaunchError) Error

func (e *LaunchError) Error() string

func (*LaunchError) Unwrap

func (e *LaunchError) Unwrap() error

type LaunchErrorCode

type LaunchErrorCode string

LaunchErrorCode identifies the phase which failed while starting an instance. Callers can use errors.As to inspect a LaunchError without parsing its human-readable message.

const (
	LaunchMissingBinary   LaunchErrorCode = "missing_binary"
	LaunchStartupFailed   LaunchErrorCode = "startup_failed"
	LaunchStartupTimeout  LaunchErrorCode = "startup_timeout"
	LaunchHandshakeFailed LaunchErrorCode = "handshake_failed"
	LaunchTransportFailed LaunchErrorCode = "transport_failed"
)

type LaunchOptions

type LaunchOptions struct {
	// JcodeHome is a persistent state directory. Empty creates a temporary
	// SDK-owned directory which is removed by Shutdown.
	JcodeHome  string
	WorkingDir string
	// InheritLogins is tri-state so its nil zero value preserves the SDK
	// behavior shared by the Rust and TypeScript SDKs: inherit by default.
	InheritLogins  *bool
	Binary         string
	Env            map[string]string
	StartupTimeout time.Duration
	CleanupTimeout time.Duration
	InheritStderr  bool
	// ClientOptions controls the protocol client created by Launch.
	ClientOptions Options
	// Observer receives redacted startup lifecycle metadata. If set, it is also
	// used by the protocol client created by Launch unless ClientOptions.Observer
	// is explicitly provided.
	Observer Observer
}

LaunchOptions controls a private jcode instance.

type ModelInfo

type ModelInfo struct {
	SessionID string `json:"session_id"`
	Provider  string `json:"provider,omitempty"`
	Model     string `json:"model,omitempty"`
}

type Observation

type Observation struct {
	Kind     string
	State    State
	Request  string
	Error    string
	Attempts int
}

Observation contains only metadata. It intentionally excludes request fields, prompts, credentials, server messages, and session identifiers.

type Observer

type Observer interface{ Observe(Observation) }

Observer receives redacted lifecycle metadata. Implementations must be safe for concurrent calls and should return quickly. Request lifecycle events are emitted as request_write_start, request_write_complete, request_reply, or request_timeout, so a missing phase identifies the stalled boundary without exposing payloads, credentials, or identifiers.

type Options

type Options struct {
	ClientName    string
	MaxFrameSize  int
	EventBuffer   int
	RequestBuffer int
	// RequestTimeout bounds each request when the caller's context has no
	// earlier deadline. Non-positive values use the 30-second default.
	RequestTimeout time.Duration
	SessionID      string
	Reconnect      ReconnectPolicy
	Observer       Observer
}

Options controls client construction and event buffering.

type PermissionRequest

type PermissionRequest struct {
	SessionID   string `json:"session_id"`
	RequestID   string `json:"request_id"`
	ToolName    string `json:"tool_name"`
	Description string `json:"description"`
}

type ReasoningDelta

type ReasoningDelta struct {
	SessionID string `json:"session_id"`
	Text      string `json:"text"`
}

type ReconnectPolicy

type ReconnectPolicy struct {
	Factory     transport.Factory
	MaxAttempts int
	Backoff     time.Duration
	MaxBackoff  time.Duration
	Resume      bool
}

type SendOptions

type SendOptions struct {
	Images  [][2]string
	NoReply bool
}

type Session

type Session struct {
	Info SessionInfo
	ID   string
	// contains filtered or unexported fields
}

func (Session) Events

func (s Session) Events(ctx context.Context) *TypedEventStream

func (Session) Send

func (s Session) Send(ctx context.Context, content string, options SendOptions) error

type SessionInfo

type SessionInfo struct {
	ID              string `json:"session_id"`
	WorkingDir      string `json:"working_dir,omitempty"`
	Title           string `json:"title,omitempty"`
	Status          string `json:"status"`
	TranscriptBytes uint64 `json:"transcript_bytes,omitempty"`
	Archived        bool   `json:"archived,omitempty"`
	ArchivedAtMS    uint64 `json:"archived_at_ms,omitempty"`
}

SessionInfo is the stable session metadata returned by the harness API.

type State

type State string
const (
	StateConnecting   State = "connecting"
	StateConnected    State = "connected"
	StateDisconnected State = "disconnected"
	StateReconnecting State = "reconnecting"
	StateClosing      State = "closing"
	StateClosed       State = "closed"
)

type Subscription

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

func (*Subscription) Close

func (s *Subscription) Close()

func (*Subscription) Next

func (s *Subscription) Next(ctx context.Context) (Event, error)

type TextDelta

type TextDelta struct {
	SessionID string `json:"session_id"`
	Text      string `json:"text"`
}

type TokenUsage

type TokenUsage struct {
	SessionID      string `json:"session_id"`
	Input          int64  `json:"input"`
	Output         int64  `json:"output"`
	CacheReadInput int64  `json:"cache_read_input,omitempty"`
}

type ToolDone

type ToolDone struct {
	SessionID string `json:"session_id"`
	CallID    string `json:"call_id"`
	Name      string `json:"name"`
	Output    string `json:"output"`
	Error     string `json:"error,omitempty"`
}

type ToolInputDelta

type ToolInputDelta struct {
	SessionID string `json:"session_id"`
	CallID    string `json:"call_id"`
	Delta     string `json:"delta"`
}

type ToolStart

type ToolStart struct {
	SessionID string `json:"session_id"`
	CallID    string `json:"call_id"`
	Name      string `json:"name"`
}

type TurnDone

type TurnDone struct {
	SessionID string `json:"session_id"`
}

type TypedEvent

type TypedEvent interface {
	// contains filtered or unexported methods
}

type TypedEventStream

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

func (*TypedEventStream) Close

func (s *TypedEventStream) Close()

func (*TypedEventStream) Next

type UnknownEvent

type UnknownEvent struct {
	Kind   string
	Fields json.RawMessage
}

Directories

Path Synopsis
examples
oneshot command
private command
streaming command

Jump to

Keyboard shortcuts

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