Documentation ¶
Index ¶
- Constants
- type Api
- func (api *Api) ApiRouter() *gin.Engine
- func (api *Api) ConnectContainer(ctx *gin.Context)
- func (api *Api) ConnectNetwork(ctx *gin.Context)
- func (api *Api) ConnectNodeNetwork(ctx *gin.Context)
- func (api *Api) CraneConfig(ctx *gin.Context)
- func (api *Api) CreateNetwork(ctx *gin.Context)
- func (api *Api) CreateNode(ctx *gin.Context)
- func (api *Api) CreateNodeNetwork(ctx *gin.Context)
- func (api *Api) CreateService(ctx *gin.Context)
- func (api *Api) CreateStack(ctx *gin.Context)
- func (api *Api) CreateVolume(ctx *gin.Context)
- func (api *Api) DeleteContainer(ctx *gin.Context)
- func (api *Api) DiffContainer(ctx *gin.Context)
- func (api *Api) GetConfig() *config.Config
- func (api *Api) GetDockerClient() *dockerclient.CraneDockerClient
- func (api *Api) HealthCheck(ctx *gin.Context)
- func (api *Api) Help(engine *gin.Engine) gin.HandlerFunc
- func (api *Api) ImageHistory(ctx *gin.Context)
- func (api *Api) Info(ctx *gin.Context)
- func (api *Api) InspectContainer(ctx *gin.Context)
- func (api *Api) InspectImage(ctx *gin.Context)
- func (api *Api) InspectNetwork(ctx *gin.Context)
- func (api *Api) InspectNode(ctx *gin.Context)
- func (api *Api) InspectNodeNetwork(ctx *gin.Context)
- func (api *Api) InspectService(ctx *gin.Context)
- func (api *Api) InspectStack(ctx *gin.Context)
- func (api *Api) InspectTask(ctx *gin.Context)
- func (api *Api) InspectVolume(ctx *gin.Context)
- func (api *Api) ListContainers(ctx *gin.Context)
- func (api *Api) ListImages(ctx *gin.Context)
- func (api *Api) ListNetworks(ctx *gin.Context)
- func (api *Api) ListNodeNetworks(ctx *gin.Context)
- func (api *Api) ListNodes(ctx *gin.Context)
- func (api *Api) ListStack(ctx *gin.Context)
- func (api *Api) ListStackService(ctx *gin.Context)
- func (api *Api) ListTasks(ctx *gin.Context)
- func (api *Api) ListVolume(ctx *gin.Context)
- func (api *Api) LogsContainer(ctx *gin.Context)
- func (api *Api) LogsService(ctx *gin.Context)
- func (api *Api) ManagerInfo(ctx *gin.Context)
- func (api *Api) PatchContainer(ctx *gin.Context)
- func (api *Api) RemoveImage(ctx *gin.Context)
- func (api *Api) RemoveNetwork(ctx *gin.Context)
- func (api *Api) RemoveNode(ctx *gin.Context)
- func (api *Api) RemoveService(ctx *gin.Context)
- func (api *Api) RemoveStack(ctx *gin.Context)
- func (api *Api) RemoveVolume(ctx *gin.Context)
- func (api *Api) ScaleService(ctx *gin.Context)
- func (api *Api) ServiceCDAddr(ctx *gin.Context)
- func (api *Api) StatsContainer(ctx *gin.Context)
- func (api *Api) StatsService(ctx *gin.Context)
- func (api *Api) UpdateNode(ctx *gin.Context)
- func (api *Api) UpdateService(ctx *gin.Context)
- func (api *Api) UpdateServiceImage(ctx *gin.Context)
- func (api *Api) UpdateStack(ctx *gin.Context)
- type ConnectNetworkRequest
- type ContainerRequest
- type CraneConfigResponse
- type RouteInfo
Constants ¶
View Source
const ( CONTAINER_KILL = "kill" CONTAINER_RM = "rm" )
View Source
const ( CodeListContainerParamError = "400-11001" CodePatchContainerParamError = "400-11002" CodePatchContainerMethodUndefined = "400-11003" CodeDeleteContainerParamError = "400-11004" CodeDeleteContainerMethodUndefined = "400-11005" )
View Source
const ( CodeConnectNetworkParamError = "400-11201" CodeConnectNetworkMethodError = "400-11202" CodeCreateNetworkParamError = "400-11203" CodeInspectNetworkParamError = "400-11204" CodeListNetworkParamError = "400-11205" )
View Source
const ( NETWORK_CONNECT = "connect" NETWORK_DISCONNECT = "disconnect" )
View Source
const ( CodeUpdateNodeParamError = "400-11301" CodeCreateNodeParamError = "400-11306" )
View Source
const ( CodeUpdateServiceParamError = "400-11401" CodeCreateServiceParamError = "400-11402" CodeScaleServiceParamError = "400-11403" CodeListTaskParamError = "400-11404" )
View Source
const ( //Stack error code CodeCreateStackParamError = "400-11501" CodeInvalidStackName = "503-11502" CodeStackNotFound = "404-11503" CodeInvalidGroupId = "400-12001" )
View Source
const (
CONTAINER_STOP_TIMEOUT = 1 << 20
)
View Source
const (
CodeCreateVolumeParamError = "400-11601"
)
View Source
const (
//Get config error code
CodeGetConfigError = "503-11901"
)
View Source
const (
//Image error code
CodeListImageParamError = "400-11101"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Api ¶
type Api struct { Client *dockerclient.CraneDockerClient Config *config.Config }
func (*Api) ConnectContainer ¶
func (*Api) ConnectNetwork ¶
func (*Api) ConnectNodeNetwork ¶
func (*Api) CraneConfig ¶
func (*Api) CreateNetwork ¶
func (*Api) CreateNode ¶
func (*Api) CreateNodeNetwork ¶
func (*Api) CreateService ¶
ServiceCreate creates a new Service.
func (*Api) CreateStack ¶
func (*Api) CreateVolume ¶
func (*Api) DeleteContainer ¶
func (*Api) DiffContainer ¶
func (*Api) GetDockerClient ¶
func (api *Api) GetDockerClient() *dockerclient.CraneDockerClient
func (*Api) HealthCheck ¶
func (*Api) ImageHistory ¶
func (*Api) InspectContainer ¶
func (*Api) InspectImage ¶
func (*Api) InspectNetwork ¶
func (*Api) InspectNode ¶
func (*Api) InspectNodeNetwork ¶
func (*Api) InspectService ¶
func (*Api) InspectStack ¶
func (*Api) InspectTask ¶
func (*Api) InspectVolume ¶
func (*Api) ListContainers ¶
func (*Api) ListImages ¶
func (*Api) ListNetworks ¶
func (*Api) ListNodeNetworks ¶
func (*Api) ListStackService ¶
func (*Api) ListVolume ¶
func (*Api) LogsContainer ¶
func (*Api) LogsService ¶
func (*Api) ManagerInfo ¶
func (*Api) PatchContainer ¶
func (*Api) RemoveImage ¶
RemoveImage remove image in assign host by image id/name
func (*Api) RemoveNetwork ¶
func (*Api) RemoveNode ¶
func (*Api) RemoveService ¶
func (*Api) RemoveStack ¶
func (*Api) RemoveVolume ¶
func (*Api) ScaleService ¶
func (*Api) ServiceCDAddr ¶
func (*Api) StatsContainer ¶
func (*Api) StatsService ¶
func (*Api) UpdateNode ¶
func (*Api) UpdateService ¶
update single service notice update service api only update service spec if network does not exist return error and don't add default label about stack and registry auth
func (*Api) UpdateServiceImage ¶
func (*Api) UpdateStack ¶
type ConnectNetworkRequest ¶
type ConnectNetworkRequest struct { Method string NetworkOptions docker.NetworkConnectionOptions }
type ContainerRequest ¶
type CraneConfigResponse ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.