subscription

package
Version: v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: MIT Imports: 1 Imported by: 64

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultSubscription = Subscription{}

DefaultSubscription is a default Subscription.

Functions

This section is empty.

Types

type Subscription

type Subscription struct {
	SubscribeAt   time.Time
	UnsubscribeAt time.Time
	Error         error
}

Subscription is usually returned from any subscription

func New

func New() Subscription

New creates a DefaultSubscription.

func (Subscription) Err

func (s Subscription) Err() error

Err returns an error recorded from a stream.

func (Subscription) Subscribe

func (s Subscription) Subscribe() Subscription

Subscribe records the time of subscription.

func (Subscription) Unsubscribe

func (s Subscription) Unsubscribe() Subscription

Unsubscribe records the time of unsubscription.

Source Files

Jump to

Keyboard shortcuts

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