goka

package
v1.0.0-dev.46 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigAdd

func ConfigAdd(path string)

Types

type Emitter

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

func NewEmitter

func NewEmitter(ctx context.Context) (*Emitter, error)

NewEmitter returns connection with default options.

func NewEmitterWithConfigPath

func NewEmitterWithConfigPath(ctx context.Context, path string) (*Emitter, error)

NewEmitterWithConfigPath returns connection with options from config path.

func NewEmitterWithOptions

func NewEmitterWithOptions(ctx context.Context, o *Options) *Emitter

NewEmitterWithOptions returns connection with options.

func (*Emitter) Emit

func (e *Emitter) Emit(ctx context.Context, topic string, key string, msg interface{}) (*goka.Promise, error)

Emit sends a message for passed key using the emitter's codec.

func (*Emitter) EmitSync

func (e *Emitter) EmitSync(ctx context.Context, topic string, key string, msg interface{}) error

EmitSync sends a message to passed topic and key.

func (*Emitter) EmitSyncWithHeaders

func (e *Emitter) EmitSyncWithHeaders(ctx context.Context, topic string, key string, msg interface{}, headers goka.Headers) error

EmitSyncWithHeaders sends a message with the given headers to passed topic and key.

func (*Emitter) EmitWithHeaders

func (e *Emitter) EmitWithHeaders(ctx context.Context, topic string, key string, msg interface{}, headers goka.Headers) (*goka.Promise, error)

EmitWithHeaders sends a message with the given headers for the passed key using the emitter's codec.

type Logger

type Logger struct {
}

func (*Logger) Debugf

func (s *Logger) Debugf(msg string, args ...interface{})

func (*Logger) Print

func (s *Logger) Print(msgs ...interface{})

func (*Logger) Printf

func (s *Logger) Printf(msg string, args ...interface{})

func (*Logger) Println

func (s *Logger) Println(msgs ...interface{})

type Options

type Options struct {
	Brokers []string
}

Options kafka connection options.

func NewOptions

func NewOptions() (*Options, error)

NewOptions returns options from config file or environment vars.

func NewOptionsWithPath

func NewOptionsWithPath(path string) (opts *Options, err error)

NewOptionsWithPath unmarshals a given key path into options and returns it.

Jump to

Keyboard shortcuts

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