model

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GRPCTransport  = "grpc"
	KafkaTransport = "kafka"
)

Variables

View Source
var (
	ErrEmptyHandlers      = errors.New("empty handlers")
	ErrInvalidMessageType = errors.New("invalid message type")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	ServiceName   string
	TransportType string
	GRPCAddresses string
	KafkaTopic    string
	Enabled       bool
}

func NewConfig

func NewConfig(cfg *config.Config) *Config

type HandlerFunc

type HandlerFunc func(messageCode string, h json.RawMessage) error

type HandlerTransport

type HandlerTransport func(messageType, messageCode string, payload json.RawMessage) error

Jump to

Keyboard shortcuts

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