Documentation ¶
Index ¶
- Constants
- func GetRandomBytes(len int) ([]byte, error)
- func GetRandomNonce() ([]byte, error)
- func JSON(context view.Context) *jsonSession
- func NewJSON(context view.Context, caller view.View, party view.Identity) (*jsonSession, error)
- func ReadFirstMessageOrPanic(context view.Context) []byte
- func ReadMessageWithTimeout(session Session, d time.Duration) ([]byte, error)
- type LocalBidirectionalChannel
- type Session
Constants ¶
View Source
const (
// NonceSize is the default NonceSize
NonceSize = 24
)
Variables ¶
This section is empty.
Functions ¶
func GetRandomBytes ¶ added in v0.4.0
GetRandomBytes returns len random looking bytes
func GetRandomNonce ¶ added in v0.4.0
GetRandomNonce returns a random byte array of length NonceSize
func ReadFirstMessageOrPanic ¶
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
Click to show internal directories.
Click to hide internal directories.