session

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSON

func JSON(context view.Context) *jsonSession

func NewJSON

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

func ReadFirstMessageOrPanic

func ReadFirstMessageOrPanic(context view.Context) []byte

func ReadMessageWithTimeout

func ReadMessageWithTimeout(session Session, d time.Duration) ([]byte, error)

Types

type LocalBidirectionalChannel added in v0.3.0

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

LocalBidirectionalChannel is a bidirectional channel that is used to simulate a session between two views (let's call them L and R) running in the same process.

func NewLocalBidirectionalChannel added in v0.3.0

func NewLocalBidirectionalChannel(caller string, contextID string, endpoint string, pkid []byte) (*LocalBidirectionalChannel, error)

NewLocalBidirectionalChannel creates a new bidirectional channel

func (*LocalBidirectionalChannel) LeftSession added in v0.3.0

func (c *LocalBidirectionalChannel) LeftSession() view.Session

LeftSession returns the session from the L to R

func (*LocalBidirectionalChannel) RightSession added in v0.3.0

func (c *LocalBidirectionalChannel) RightSession() view.Session

RightSession returns the session from the R to L

type Session

type Session interface {
	view.Session
}

func ReadFirstMessage

func ReadFirstMessage(context view.Context) (Session, []byte, error)

Jump to

Keyboard shortcuts

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