Added image autopull.

This commit is contained in:
rony5394
2026-03-12 22:48:02 +01:00
parent 2dda7dbb38
commit 064a944655
8 changed files with 69 additions and 22 deletions

View File

@@ -16,12 +16,14 @@ import (
"github.com/docker/docker/api/types/network"
"github.com/docker/docker/api/types/swarm"
"github.com/docker/docker/client"
cfg "github.com/rony5394/blazena/config"
)
// Add mutex.
var ApiClient *client.Client;
var scale sync.Map;
var token string = "12345";
var theConfig cfg.Config;
type aService struct{
ServiceId string `json:"serviceId"`;
@@ -29,7 +31,8 @@ type aService struct{
Node string `json:"node"`;
}
func Run(){
func Run(Config cfg.Config){
theConfig = Config;
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM);
var err error;