flag

package
v0.0.113 Latest Latest
Warning

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

Go to latest
Published: May 17, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Port                 int     // gin 监听端口
	KubeConfig           string  // KUBECONFIG文件路径
	ApiKey               string  // OPENAI_API_KEY
	ApiURL               string  // OPENAI_API_URL
	ApiModel             string  // OPENAI_MODEL
	Debug                bool    // 调试模式,同步修改所有的debug模式
	LogV                 int     // klog的日志级别klog.V(this)
	InCluster            bool    // 是否集群内模式
	LoginType            string  // password,oauth,token,.. 登录方式,默认为password
	EnableTempAdmin      bool    // 是否启用临时管理员账户配置
	AdminUserName        string  // 管理员用户名,启用临时管理员账户配置后生效
	AdminPassword        string  // 管理员密码,启用临时管理员账户配置后生效
	JwtTokenSecret       string  // JWT token secret
	NodeShellImage       string  // nodeShell 镜像
	KubectlShellImage    string  // kubectlShell 镜像
	ImagePullTimeout     int     // 镜像拉取超时时间(秒)
	SqlitePath           string  // sqlite 数据库路径
	AnySelect            bool    // 是否开启任意选择,默认开启
	PrintConfig          bool    // 是否打印配置信息
	Version              string  // 版本号,由编译时自动注入
	GitCommit            string  // git commit, 由编译时自动注入
	GitTag               string  // git tag, 由编译时自动注入
	GitRepo              string  // git仓库地址, 由编译时自动注入
	BuildDate            string  // 编译时间, 由编译时自动注入
	EnableAI             bool    // 是否启用AI功能,默认开启
	ConnectCluster       bool    // 启动程序后,是否自动连接发现的集群,默认关闭
	UseBuiltInModel      bool    // 是否使用内置大模型参数,默认开启
	ProductName          string  // 产品名称,默认为K8M
	ResourceCacheTimeout int     // 资源缓存时间(秒)
	Temperature          float32 // 模型温度
	TopP                 float32 //  模型topP参数
	MaxHistory           int32   //  模型对话上下文历史记录数
}

func Init

func Init() *Config

func (*Config) InitFlags

func (c *Config) InitFlags()

func (*Config) ShowConfigCloseMethod added in v0.0.78

func (c *Config) ShowConfigCloseMethod()

func (*Config) ShowConfigInfo added in v0.0.74

func (c *Config) ShowConfigInfo()

Jump to

Keyboard shortcuts

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