producer

package
v0.0.0-...-7ed803a Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package producer push decoded messages to messaging queue : ---------------------------------------------------------------------------- : Copyright (C) 2017 Verizon. All Rights Reserved. : All Rights Reserved : : file: kafka.go : details: TODO : author: Mehrdad Arshad Rad : date: 02/01/2017 : : Licensed under the Apache License, Version 2.0 (the "License"); : you may not use this file except in compliance with the License. : You may obtain a copy of the License at : : http://www.apache.org/licenses/LICENSE-2.0 : : Unless required by applicable law or agreed to in writing, software : distributed under the License is distributed on an "AS IS" BASIS, : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. : See the License for the specific language governing permissions and : limitations under the License. : ----------------------------------------------------------------------------

Package producer push decoded messages to messaging queue : ---------------------------------------------------------------------------- : Copyright (C) 2017 Verizon. All Rights Reserved. : All Rights Reserved : : file: nsq.go : details: TODO : author: Mehrdad Arshad Rad : date: 02/01/2017 : : Licensed under the Apache License, Version 2.0 (the "License"); : you may not use this file except in compliance with the License. : You may obtain a copy of the License at : : http://www.apache.org/licenses/LICENSE-2.0 : : Unless required by applicable law or agreed to in writing, software : distributed under the License is distributed on an "AS IS" BASIS, : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. : See the License for the specific language governing permissions and : limitations under the License. : ----------------------------------------------------------------------------

Package producer push decoded messages to messaging queue : ---------------------------------------------------------------------------- : Copyright (C) 2017 Verizon. All Rights Reserved. : All Rights Reserved : : file: producer.go : details: TODO : author: Mehrdad Arshad Rad : date: 02/01/2017 : : Licensed under the Apache License, Version 2.0 (the "License"); : you may not use this file except in compliance with the License. : You may obtain a copy of the License at : : http://www.apache.org/licenses/LICENSE-2.0 : : Unless required by applicable law or agreed to in writing, software : distributed under the License is distributed on an "AS IS" BASIS, : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. : See the License for the specific language governing permissions and : limitations under the License. : ----------------------------------------------------------------------------

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Kafka

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

Kafka represents kafka producer

type KafkaConfig

type KafkaConfig struct {
	Brokers []string `json:"brokers"`
}

KafkaConfig represents kafka configuration

type MQueue

type MQueue interface {
	// contains filtered or unexported methods
}

MQueue represents messaging queue methods

type NSQ

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

NSQ represents nsq producer

type NSQConfig

type NSQConfig struct {
	Broker string `json:"broker"`
}

NSQConfig represents NSQ configuration

type Producer

type Producer struct {
	MQ           MQueue
	MQConfigFile string
	MQErrorCount *uint64

	Topic string
	Chan  chan []byte

	Logger *log.Logger
}

Producer represents messaging queue

func NewProducer

func NewProducer(mqName string) *Producer

NewProducer constructs new Messaging Queue

func (*Producer) Run

func (p *Producer) Run() error

Run configs and tries to be ready to produce

func (*Producer) Shutdown

func (p *Producer) Shutdown()

Shutdown stops the producer

Jump to

Keyboard shortcuts

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