notify_util

package
v0.0.0-...-f374617 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

This package is designed to generate notifications with in cim Every time no need to write all code, just call Raise Event.

Index

Constants

This section is empty.

Variables

View Source
var InputDetails *types.UserInput

Functions

func CreateKeyValuesInArrayFormat

func CreateKeyValuesInArrayFormat(key []string, val []string) (key_val_obj [][]string)

func CreateKeyValuesInArrayFormatFromMap

func CreateKeyValuesInArrayFormatFromMap(key_val map[string]string) (key_val_obj [][]string)

func InitNotificationFramework

func InitNotificationFramework()

This function configures kafka publisher

func Push

func Push(ctx context.Context, key, value []byte, k *KafkaPublisher) (err error)

Push pushesh event to kafka

func RaiseEvent

func RaiseEvent(event_name string, manage_details_keys []string, manage_details_val []string, additional_info_key []string, additional_info_val []string) (err error)

Types

type KafkaPublisher

type KafkaPublisher struct {
	Context   context.Context
	Subject   string
	Namespace string
	PodID     string
	Writer    *kafka.Writer
	MsgCount  int
}

func NewKafkaPublisher

func NewKafkaPublisher(inputDetails *types.UserInput, subject string, w *kafka.Writer) *KafkaPublisher

NewKafkaPublisher initialize

Jump to

Keyboard shortcuts

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