import "google.golang.org/appengine/module"
簡介
套件模組提供函式以與模組互動。
appengine 套件包含能報告應用程序身分 (包括模組名稱) 的函式。
索引
- func DefaultVersion(c context.Context, module string) (string, error)
- func List(c context.Context) ([]string, error)
- func NumInstances(c context.Context, module, version string) (int, error)
- func SetNumInstances(c context.Context, module, version string, instances int) error
- func Start(c context.Context, module, version string) error
- func Stop(c context.Context, module, version string) error
- func Versions(c context.Context, module string) ([]string, error)
func DefaultVersion
func DefaultVersion(c context.Context, module string) (string, error)
DefaultVersion 傳回指定模組的預設版本。如果模組為空白字串,即代表預設模組。
func List
func List(c context.Context) ([]string, error)
List 傳回屬於這個應用程式的模組的名稱。
func NumInstances
func NumInstances(c context.Context, module, version string) (int, error)
NumInstances 傳回指定模組/版本的執行個體數目。如果其中一個引數為空白字串,即代表預設值。
func SetNumInstances
func SetNumInstances(c context.Context, module, version string, instances int) error
SetNumInstances 將特定 module.version 的執行個體數設為為指定的值。如果模組或版本為空白字串,即代表預設值。
func Start
func Start(c context.Context, module, version string) error
Start 啟動指定模組的指定版本。如果模組或版本為空白字串,即代表預設值。
func Stop
func Stop(c context.Context, module, version string) error
Stop 停止指定模組的指定版本。如果模組或版本為空白字串,即代表預設值。
func Versions
func Versions(c context.Context, module string) ([]string, error)
Versions 傳回屬於指定模組的版本的名稱。如果模組為空白字串,即代表預設模組。