Documentation
¶
Index ¶
- func BodyToString(header http.Header, body []byte) string
- func CheckServiceIsExistInEnv(serviceName string) bool
- func Contains(slice []string, target string) bool
- func DownloadFile(downloadURL string, saveDir string) (string, error)
- func GenerateNonceString(n int) string
- func GetAOGDataDir() (string, error)
- func GetAbsolutePath(p string, base string) string
- func GetDownloadDir() (string, error)
- func GetGpuInfo() (int, error)
- func GetSystemVersion() int
- func GetUserDataDir() (string, error)
- func HmacSha256(s, key string) string
- func HmacSha256String(s, key string) string
- func IpexOllamaSupportGPUStatus() bool
- func IsHTTPText(header http.Header) bool
- func IsServerRunning() bool
- func ParseImageData(data []byte) ([][]byte, error)
- func ParseTableOutput(output string) map[string]string
- func Sha256hex(s string) string
- func StartAOGServer(logPath string, pidFilePath string) error
- func StopAOGServer(pidFilePath string) error
- func UnzipFile(zipFile, destDir string) error
- type MemoryInfo
- type SafeList
- func (sl *SafeList) Back() *list.Element
- func (sl *SafeList) Front() *list.Element
- func (sl *SafeList) InsertAfter(v any, mark *list.Element) *list.Element
- func (sl *SafeList) InsertBefore(v any, mark *list.Element) *list.Element
- func (l *SafeList) Len() int
- func (sl *SafeList) MoveAfter(e, mark *list.Element)
- func (sl *SafeList) MoveBefore(e, mark *list.Element)
- func (sl *SafeList) MoveToBack(e *list.Element)
- func (sl *SafeList) MoveToFront(e *list.Element)
- func (sl *SafeList) PushBack(v any) *list.Element
- func (sl *SafeList) PushFront(v any) *list.Element
- func (sl *SafeList) Remove(e *list.Element) any
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckServiceIsExistInEnv ¶
CheckServiceIsExistInEnv 检查服务是否存在于环境变量
func GenerateNonceString ¶
func GetAOGDataDir ¶
func GetAbsolutePath ¶
GetAbsolutePath Convert relative path to absolute path from the passed in base directory No change if the passed in path is already an absolute path
func GetDownloadDir ¶
func GetGpuInfo ¶
func GetSystemVersion ¶
func GetSystemVersion() int
func GetUserDataDir ¶
func HmacSha256 ¶
func HmacSha256String ¶
func IpexOllamaSupportGPUStatus ¶
func IpexOllamaSupportGPUStatus() bool
func IsHTTPText ¶
func IsServerRunning ¶
func IsServerRunning() bool
func ParseImageData ¶
func ParseTableOutput ¶
+-----------------------------+--------------------------------------------------------------------+ | Device ID | 0 | +-----------------------------+--------------------------------------------------------------------+ | GPU Utilization (%) | 0 | | EU Array Active (%) | | Analyze the output table content of the above terminal command
func StartAOGServer ¶
func StopAOGServer ¶
Types ¶
type MemoryInfo ¶
func GetMemoryInfo ¶
func GetMemoryInfo() (*MemoryInfo, error)
type SafeList ¶
type SafeList struct {
// contains filtered or unexported fields
}
func NewSafeList ¶
func NewSafeList() *SafeList