stream

package
v0.11.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Processor

type Processor struct {
	// contains filtered or unexported fields
}

func New

func New(state *state.State, oauthServer oauth.Server) Processor

func (*Processor) Authorize

func (p *Processor) Authorize(ctx context.Context, accessToken string) (*gtsmodel.Account, gtserror.WithCode)

Authorize returns an oauth2 token info in response to an access token query from the streaming API

func (*Processor) Delete

func (p *Processor) Delete(statusID string) error

Delete streams the delete of the given statusID to *ALL* open streams.

func (*Processor) Notify

func (p *Processor) Notify(n *apimodel.Notification, account *gtsmodel.Account) error

Notify streams the given notification to any open, appropriate streams belonging to the given account.

func (*Processor) Open

func (p *Processor) Open(ctx context.Context, account *gtsmodel.Account, streamType string) (*stream.Stream, gtserror.WithCode)

Open returns a new Stream for the given account, which will contain a channel for passing messages back to the caller.

func (*Processor) Update

func (p *Processor) Update(s *apimodel.Status, account *gtsmodel.Account, streamTypes []string) error

Update streams the given update to any open, appropriate streams belonging to the given account.

Jump to

Keyboard shortcuts

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