stream

package
v0.0.0-...-75ad633 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StreamAmqp = iota
)

Variables

View Source
var Streams = make(map[int]Stream, 1)

Functions

This section is empty.

Types

type AmqpStream

type AmqpStream struct {
	URI        *amqp.URI
	Connection *amqp.Connection
	Channel    *amqp.Channel
	Config     *config.Configuration
}

func (*AmqpStream) Connect

func (s *AmqpStream) Connect() error

Connect connects to the AMQP server. The credentials are received by the AmqpInstance struct

func (*AmqpStream) DeclareAndBind

func (s *AmqpStream) DeclareAndBind(config *config.AmqpConfiguration) error

DeclareAndBind defines the exchange and queue at the AMQP server. We declare our topology on both the publisher and consumer to ensure they are the same. This is part of AMQP being a programmable messaging model. After declaring we are binding it to be able to receive messages in the queue by the exchange.

func (*AmqpStream) Initialize

func (s *AmqpStream) Initialize(config *config.Configuration)

func (*AmqpStream) Start

func (s *AmqpStream) Start() error

type Gotrap

type Gotrap struct {
	Message gerrit.Message
	// contains filtered or unexported fields
}

func (*Gotrap) IsBranchConfigured

func (trap *Gotrap) IsBranchConfigured(project, branch string) (bool, error)

func (*Gotrap) IsProjectConfigured

func (trap *Gotrap) IsProjectConfigured(project string) (bool, error)

func (*Gotrap) IsSubjectExcludedByPattern

func (trap *Gotrap) IsSubjectExcludedByPattern(subject string) (bool, string)

func (*Gotrap) TakeAction

func (trap *Gotrap) TakeAction()

type Stream

type Stream interface {
	Initialize(*config.Configuration)
	Start() error
}

func GetStream

func GetStream(streamType int) (Stream, error)

Jump to

Keyboard shortcuts

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