lkit_go

package module
v0.0.0-...-0b7460b Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LogLevelTrace  = log.LogLevelTrace
	LogLevelDebug  = log.LogLevelDebug
	LogLevelInfo   = log.LogLevelInfo
	LogLevelNotice = log.LogLevelNotice
	LogLevelWarn   = log.LogLevelWarn
	LogLevelError  = log.LogLevelError
	LogLevelCriti  = log.LogLevelCriti
	LogLevelFatal  = log.LogLevelFatal
	LogLevelPanic  = log.LogLevelPanic
)

Functions

func Critif

func Critif(format string, v ...interface{})

func Debugf

func Debugf(format string, v ...interface{})

func Errorf

func Errorf(format string, v ...interface{})

func Fatalf

func Fatalf(format string, v ...interface{})

func Infof

func Infof(format string, v ...interface{})

func NewGlobalLogger

func NewGlobalLogger(writers []io.Writer, level LogLevel, initFun func(logger zerolog.Logger) zerolog.Logger)

func NewRpcConsistentHashSelector

func NewRpcConsistentHashSelector() client.Selector

func NewRpcPeerSelector

func NewRpcPeerSelector() client.Selector

func Noticef

func Noticef(format string, v ...interface{})

func StringCamelCase

func StringCamelCase(s string) string

func StringLowerCase

func StringLowerCase(s string) string

func Tracef

func Tracef(format string, v ...interface{})

func Warnf

func Warnf(format string, v ...interface{})

Types

type AppOption

type AppOption = application.AppOption

func WithAppBootFlag

func WithAppBootFlag(flag interface{}) AppOption

WithAppBootFlag app注入一个启动参数结构体

type Application

type Application = application.Application

type ApplicationDescInfo

type ApplicationDescInfo = application.ApplicationDescInfo

ApplicationDescInfo 调度器创建app依赖的描述信息

func NewApplicationDescInfo

func NewApplicationDescInfo(name string, initFunc func(globalBootFlag *CommBootFlag, globalBootFile interface{}, app *Application) error, options ...AppOption) *ApplicationDescInfo

type CommBootFlag

type CommBootFlag = application.CommBootFlag

CommBootFlag 调度器的全局通用启动参数

type Handler

type Handler = log.Handler

type JoyClient

type JoyClient = joyclient.Service

func NewRpcClient

func NewRpcClient(service string, etcdServerAddrs []string, callTimeout time.Duration, isPermanentSocketLink bool) *JoyClient

type JoySelector

type JoySelector = joyclient.Selector

type JoyService

type JoyService = joyservice.ServicesManager

func NewRpcService

func NewRpcService(listenAddr, exposeAddr string, etcdServerAddrs []string) (*JoyService, error)

func NewRpcServiceWithKey

func NewRpcServiceWithKey(key string, listenAddr, exposeAddr string, etcdServerAddrs []string) (*JoyService, error)

type LogLevel

type LogLevel = log.LogLevel

type Scheduler

type Scheduler = application.Scheduler

func NewScheduler

func NewScheduler(options ...SchedulerOption) *Scheduler

NewScheduler 创建调度器,调度器可以创建多个app和运行app

type SchedulerOption

type SchedulerOption = application.SchedulerOption

func WithSchedulerBootConfigFileContent

func WithSchedulerBootConfigFileContent(content interface{}) SchedulerOption

WithSchedulerBootConfigFileContent 设置启动配置文件的解析结构,指针结构体类型,不设置默认无起服配置,默认以yaml解析

func WithSchedulerBootConfigFileParser

func WithSchedulerBootConfigFileParser(f func(content []byte, out interface{}) error) SchedulerOption

WithSchedulerBootConfigFileParser 设置起服文件解析函数,默认yaml格式

func WithSchedulerCreateOneAppOption

func WithSchedulerCreateOneAppOption(appDescInfo *ApplicationDescInfo) SchedulerOption

WithSchedulerCreateOneAppOption 通过scheduler创建一个app

func WithSchedulerLogFileLevel

func WithSchedulerLogFileLevel(level LogLevel) SchedulerOption

type WebEngine

type WebEngine = engine.Engine

func NewEngine

func NewEngine(addr string, newContextFun func() WebEngineContext) *WebEngine

type WebEngineContext

type WebEngineContext = engine.Context

Jump to

Keyboard shortcuts

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