Documentation ¶
Index ¶
- Constants
- Variables
- func IsCancelledError(err error) bool
- type Any
- type Disposable
- type FnOnCancel
- type FnOnComplete
- type FnOnDiscard
- type FnOnError
- type FnOnFinally
- type FnOnNext
- type FnOnRequest
- type FnOnSubscribe
- type Predicate
- type Processor
- type Publisher
- type RawPublisher
- type SignalType
- type Subscriber
- type SubscriberOption
- type Subscription
- type Transformer
Constants ¶
View Source
const RequestInfinite = math.MaxInt32
Variables ¶
View Source
var ( ErrNegativeRequest = fmt.Errorf("invalid request: n must be between %d and %d", 1, RequestInfinite) ErrSubscribeCancelled = errors.New("subscriber has been cancelled") )
View Source
var CoreCounts int32
Functions ¶
func IsCancelledError ¶ added in v0.2.4
Types ¶
type Disposable ¶
type Disposable interface { // Dispose dispose current resource. Dispose() // IsDisposed returns true if it has been disposed. IsDisposed() bool }
Disposable is a disposable resource.
type FnOnCancel ¶
type FnOnCancel = func()
type FnOnComplete ¶
type FnOnComplete = func()
type FnOnDiscard ¶ added in v0.0.4
type FnOnDiscard = func(v Any)
type FnOnFinally ¶
type FnOnFinally = func(s SignalType)
type FnOnRequest ¶
type FnOnRequest = func(n int)
type FnOnSubscribe ¶
type FnOnSubscribe = func(ctx context.Context, su Subscription)
type Processor ¶
type Processor interface { Publisher Subscriber }
type Publisher ¶
type Publisher interface { RawPublisher Subscribe(context.Context, ...SubscriberOption) }
type RawPublisher ¶ added in v0.0.2
type RawPublisher interface {
SubscribeWith(context.Context, Subscriber)
}
type SignalType ¶ added in v0.0.5
type SignalType int8
const ( SignalTypeDefault SignalType = iota SignalTypeComplete SignalTypeCancel SignalTypeError )
func (SignalType) String ¶ added in v0.0.5
func (s SignalType) String() string
type Subscriber ¶
type Subscriber interface { OnComplete() OnError(error) OnNext(Any) OnSubscribe(context.Context, Subscription) }
func NewSubscriber ¶
func NewSubscriber(opts ...SubscriberOption) Subscriber
type SubscriberOption ¶
type SubscriberOption func(*subscriber)
func OnComplete ¶
func OnComplete(onComplete FnOnComplete) SubscriberOption
func OnError ¶
func OnError(onError FnOnError) SubscriberOption
func OnNext ¶
func OnNext(onNext FnOnNext) SubscriberOption
func OnSubscribe ¶
func OnSubscribe(onSubscribe FnOnSubscribe) SubscriberOption
type Subscription ¶
type Subscription interface { Request(n int) Cancel() }
type Transformer ¶
Click to show internal directories.
Click to hide internal directories.