Documentation
¶
Index ¶
- Variables
- func DoUpgrade(cancel context.CancelFunc, done chan int) error
- func DownloadNewRelease(ctx context.Context, updateResp UpdateResponse) error
- func GetStarted() error
- func InitLogging()
- func IsServerRunning(ctx context.Context) bool
- func Run()
- func ShowLogs()
- func SpawnServer(ctx context.Context, command string) (chan int, error)
- func StartBackgroundUpdaterChecker(ctx context.Context, cb func(string) error)
- type UpdateResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AppName = "ollama app" CLIName = "ollama" AppDir = "/opt/Ollama" AppDataDir = "/opt/Ollama" // TODO - should there be a distinct log dir? UpdateStageDir = "/tmp" AppLogFile = "/tmp/ollama_app.log" ServerLogFile = "/tmp/ollama.log" UpgradeLogFile = "/tmp/ollama_update.log" Installer = "OllamaSetup.exe" LogRotationCount = 5 )
View Source
var ( UpdateCheckURLBase = "https://ollama.com/api/update" UpdateDownloaded = false UpdateCheckInterval = 60 * 60 * time.Second )
Functions ¶
func DownloadNewRelease ¶
func DownloadNewRelease(ctx context.Context, updateResp UpdateResponse) error
func GetStarted ¶
func GetStarted() error
func InitLogging ¶
func InitLogging()
func IsServerRunning ¶
Types ¶
type UpdateResponse ¶
TODO - maybe move up to the API package?
func IsNewReleaseAvailable ¶
func IsNewReleaseAvailable(ctx context.Context) (bool, UpdateResponse)
Click to show internal directories.
Click to hide internal directories.