harukap

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

harukap

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthPlugin

type AuthPlugin interface {
	GetAuthInfo() (*commons.AuthInfo, error)
	AuthName() string
	GetAuthUserByToken(token string) (commons.AuthUser, error)
	TokenTypeName() string
}

type HarukaAppEngine

type HarukaAppEngine struct {
	ConfigProvider       *config.Provider
	Plugins              []HarukaPlugin
	LoggerPlugin         LoggerPlugin
	HttpService          *haruka.Engine
	RPCService           *rpc.HarukaRPCService
	OnPluginInitComplete func()
}

func NewHarukaAppEngine

func NewHarukaAppEngine() *HarukaAppEngine

func (*HarukaAppEngine) GetPluginsConfig

func (e *HarukaAppEngine) GetPluginsConfig() map[string]map[string]interface{}

GetPluginsConfig 汇总所有实现了 PluginWithConfig 的插件配置

func (*HarukaAppEngine) Run

func (e *HarukaAppEngine) Run()

func (*HarukaAppEngine) RunRPC

func (e *HarukaAppEngine) RunRPC()

func (*HarukaAppEngine) UsePlugin

func (e *HarukaAppEngine) UsePlugin(plugins ...HarukaPlugin)

type HarukaPlugin

type HarukaPlugin interface {
	OnInit(e *HarukaAppEngine) error
}

type LoggerPlugin

type LoggerPlugin interface {
	OnInit(*config.Provider) error
	NewScope(name string) *youlog.Scope
	Application() string
	Instance() string
}

LoggerPlugin 日志插件抽象,具体实现由 polaris toolkit (youplustoolkit/youlog.Plugin)提供。harukap 只依赖该接口, 不再引用 toolkit,保证依赖方向为 toolkit -> harukap -> haruka。

type PluginWithConfig

type PluginWithConfig interface {
	GetPluginConfig() map[string]interface{}
}

PluginWithConfig 可选接口:插件实现后即可提供其配置快照

Directories

Path Synopsis
module
plugins
llm
otl

Jump to

Keyboard shortcuts

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