Movatterモバイル変換


[0]ホーム

URL:


Alert GO-2024-3228: Coder vulnerable to post-auth URL redirection to untrusted site ('Open Redirect') in github.com/coder/coder
Notice  The highest tagged major version isv2.

pubsub

package
v0.27.3Latest Latest
Warning

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

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

Details

Repository

github.com/coder/coder

Links

Documentation

Index

Constants

View Source
const BufferSize = 2048

BufferSize is the maximum number of unhandled messages we will bufferfor a subscriber before dropping messages.

Variables

View Source
var ErrDroppedMessages =xerrors.New("dropped messages")

ErrDroppedMessages is sent to ListenerWithErr if messages are dropped ormight have been dropped.

Functions

This section is empty.

Types

typeListener

type Listener func(ctxcontext.Context, message []byte)

Listener represents a pubsub handler.

typeListenerWithErr

type ListenerWithErr func(ctxcontext.Context, message []byte, errerror)

ListenerWithErr represents a pubsub handler that can also receive errorindications

typeMemoryPubsubadded inv0.26.1

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

MemoryPubsub is an in-memory Pubsub implementation. It's an exported type so that our test code can do typechecks.

func (*MemoryPubsub)Closeadded inv0.26.1

func (*MemoryPubsub) Close()error

func (*MemoryPubsub)Publishadded inv0.26.1

func (m *MemoryPubsub) Publish(eventstring, message []byte)error

func (*MemoryPubsub)Subscribeadded inv0.26.1

func (m *MemoryPubsub) Subscribe(eventstring, listenerListener) (cancel func(), errerror)

func (*MemoryPubsub)SubscribeWithErradded inv0.26.1

func (m *MemoryPubsub) SubscribeWithErr(eventstring, listenerListenerWithErr) (cancel func(), errerror)

typePubsub

type Pubsub interface {Subscribe(eventstring, listenerListener) (cancel func(), errerror)SubscribeWithErr(eventstring, listenerListenerWithErr) (cancel func(), errerror)Publish(eventstring, message []byte)errorClose()error}

Pubsub is a generic interface for broadcasting and receiving messages.Implementors should assume high-availability with the backing implementation.

funcNew

func New(ctxcontext.Context, database *sql.DB, connectURLstring) (Pubsub,error)

New creates a new Pubsub implementation using a PostgreSQL connection.

funcNewInMemory

func NewInMemory()Pubsub

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp