session

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JsonSession

type JsonSession interface {
	Info() view.SessionInfo
	Send(payload any) error
	SendRaw(ctx context.Context, raw []byte) error
	SendWithContext(ctx context.Context, payload any) error
	SendError(error string) error
	SendErrorWithContext(ctx context.Context, error string) error
	Receive(state interface{}) error
	ReceiveWithTimeout(state interface{}, d time.Duration) error
	ReceiveRaw() ([]byte, error)
	ReceiveRawWithTimeout(d time.Duration) ([]byte, error)
	Session() Session
}

func JSON

func JSON(context view.Context) JsonSession

func NewFromInitiator

func NewFromInitiator(context view.Context, party view.Identity) (JsonSession, error)

func NewFromSession

func NewFromSession(context view.Context, s Session) JsonSession

func NewJSON

func NewJSON(context view.Context, caller view.View, party view.Identity) (JsonSession, error)

type Session

type Session = view.Session

Jump to

Keyboard shortcuts

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