Documentation
¶
Index ¶
- Constants
- Variables
- type Marshaller
- type S
- func (j *S) Info() view.SessionInfo
- func (j *S) Receive(state any) error
- func (j *S) ReceiveRaw() ([]byte, error)
- func (j *S) ReceiveRawWithTimeout(d time.Duration) ([]byte, error)
- func (j *S) ReceiveWithTimeout(state any, d time.Duration) error
- func (j *S) Send(state any) error
- func (j *S) SendError(err string) error
- func (j *S) SendErrorWithContext(ctx context.Context, err string) error
- func (j *S) SendRaw(ctx context.Context, raw []byte) error
- func (j *S) SendWithContext(ctx context.Context, state any) error
- func (j *S) Session() Session
- type Session
Constants ¶
View Source
const DefaultReceiveTimeout = 10 * time.Second
Variables ¶
View Source
var ErrContextDone = errors.New("context done")
ErrContextDone is returned when the context is done.
View Source
var ErrNilMessage = errors.New("received message is nil")
ErrNilMessage is returned when a nil message is received.
View Source
var ErrTimeout = errors.New("session timeout")
ErrTimeout is returned when a session receive operation times out.
Functions ¶
This section is empty.
Types ¶
type Marshaller ¶
Marshaller is a generic interface for marshalling and unmarshalling data.
type S ¶
type S struct {
// contains filtered or unexported fields
}
func (*S) Info ¶
func (j *S) Info() view.SessionInfo
func (*S) ReceiveRaw ¶
func (*S) ReceiveRawWithTimeout ¶
func (*S) SendErrorWithContext ¶
Click to show internal directories.
Click to hide internal directories.