constraint

package
v0.5.16 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 3 Imported by: 6

Documentation

Overview

信息总线相关定义

Index

Constants

This section is empty.

Variables

View Source
var QueueGroup = "home_default_stream_group"
View Source
var QueueName = "home_default_stream"

Functions

This section is empty.

Types

type AfterRegistration

type AfterRegistration interface {
	Boot()
}

AfterRegistration 注册完成后, 统一处理

type Broker

type Broker interface {
	Push(event interface{}, names ...string)
	Consumer(job Job)
	Loop()
}

信息中间人

type Construct

type Construct interface {
	// Init 初始化
	Init()
}

Construct 具备结构体Bean

type Exit

type Exit interface {
	Exit()
}

type Job

type Job interface {
	Handler()
}

type JobConfig

type JobConfig struct {
	Message   interface{}
	GroupName string
	QueueName string
}

type KernelServer

type KernelServer interface {
	Init()
	Run()
	Exit()
}

每个独立服务的业务配置

type RedisClient

type RedisClient interface {
	GetClient() *redis.Client
}

type Route

type Route interface {
	GetGroup() string
	GetRoutes() map[*api.Config]func(c *gin.Context)
}

type RunAfter added in v0.5.3

type RunAfter interface {
	RunAfter()
}

RunAfter 在Run执行后执行, 可以做服务准备好状态维护等

type ServiceProvider

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

type SetGroup

type SetGroup interface {
	SetGroup() string
}

type SetQueue

type SetQueue interface {
	SetQueue() string
}

type SetRoute

type SetRoute interface {
	SetRoute() string
}

type SetSerial

type SetSerial interface {
	SetSerial() bool
}

SetSerial 设置为穿行消费

type Task

type Task struct {
	ID    string
	Group string
	Queue string
	Event interface{}
}

type Worker

type Worker interface {
	Run(job Job, task Task)
}

Jump to

Keyboard shortcuts

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