Documentation ¶
Index ¶
- func S(f func() error, sess *Session, cfg *SessionConfig) error
- func SetClientLogFunc(logf func(string))
- func SetDefaultSessionConfig(cfg SessionConfig) bool
- func SetServerLogFunc(logf func(string, ...any))
- type Client
- type EndCause
- type Session
- type SessionConfig
- type SrpcError
- type StreamEvent
- type StreamHandle
- func (h *StreamHandle) C() <-chan any
- func (h *StreamHandle) Cancel() bool
- func (h *StreamHandle) CancelAndResult() error
- func (h *StreamHandle) EndedC() <-chan struct{}
- func (h *StreamHandle) GetError() error
- func (h *StreamHandle) IsEnded() bool
- func (h *StreamHandle) Result() error
- func (h *StreamHandle) SoftCancel() bool
- func (h *StreamHandle) Success() bool
- type StreamManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetClientLogFunc ¶
func SetClientLogFunc(logf func(string))
func SetDefaultSessionConfig ¶
func SetDefaultSessionConfig(cfg SessionConfig) bool
func SetServerLogFunc ¶
Types ¶
type Client ¶
func WrapClient ¶
func (*Client) CallStream ¶
func (c *Client) CallStream(name string, args any) (h *StreamHandle, err error)
type SessionConfig ¶
type StreamEvent ¶
type StreamEvent struct { Typ streamEventType Data any }
type StreamHandle ¶ added in v0.1.9
type StreamHandle struct { EndCause EndCause Err error Panic *panicInfo // contains filtered or unexported fields }
func (*StreamHandle) C ¶ added in v0.1.9
func (h *StreamHandle) C() <-chan any
func (*StreamHandle) Cancel ¶ added in v0.1.9
func (h *StreamHandle) Cancel() bool
func (*StreamHandle) CancelAndResult ¶ added in v0.1.9
func (h *StreamHandle) CancelAndResult() error
func (*StreamHandle) EndedC ¶ added in v0.2.0
func (h *StreamHandle) EndedC() <-chan struct{}
func (*StreamHandle) GetError ¶ added in v0.1.9
func (h *StreamHandle) GetError() error
func (*StreamHandle) IsEnded ¶ added in v0.2.0
func (h *StreamHandle) IsEnded() bool
func (*StreamHandle) Result ¶ added in v0.1.9
func (h *StreamHandle) Result() error
func (*StreamHandle) SoftCancel ¶ added in v0.2.3
func (h *StreamHandle) SoftCancel() bool
func (*StreamHandle) Success ¶ added in v0.1.9
func (h *StreamHandle) Success() bool
type StreamManager ¶
type StreamManager struct {
// contains filtered or unexported fields
}
func (*StreamManager) Poll ¶
func (m *StreamManager) Poll(sid uint64, reply *[]*StreamEvent) error
func (*StreamManager) SoftCancel ¶ added in v0.2.4
func (m *StreamManager) SoftCancel(sid uint64, loaded *bool) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.