gopher-task-system

command module
v0.0.0-...-f0077a4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2024 License: MIT Imports: 7 Imported by: 0

README

Task Management application using Go

A simple task system using Go Docker SDK.

Prerequisites

  • Go (tested with 1.17.2)
  • Docker

Steps to Run

  • Clone the repository
git clone https://github.com/dockersamples/gopher-task-system.git
  • Project directory structure
$ tree
.
├── LICENSE
├── README.md
├── go.mod
├── go.sum
├── internal
│   ├── container-manager
│   │   └── container_manager.go
│   ├── task-runner
│   │   └── runner.go
│   └── types
│       └── task.go
├── main.go
└── task.yaml

4 directories, 9 files
  • Build the task system
go build -o gopher
  • Run tasks
$ ./gopher run task.yaml

preparing task -  gopher-loops
preparing task -  hello-gopher
starting task -  gopher-loops
starting task -  hello-gopher
completed task -  hello-gopher
completed task -  gopher-loops

Docker Desktop

  • Run docker ps -a to see what all task containers
$ docker ps -a
CONTAINER ID   IMAGE     COMMAND                  CREATED         STATUS                     PORTS     NAMES
396e25d3cea8   busybox   "sh -c 'for i in `se…"   6 minutes ago   Exited (0) 6 minutes ago             gopher-loops
aba428b48a0c   busybox   "echo 'Hello, Gopher…"   6 minutes ago   Exited (0) 6 minutes ago             hello-gopher

Sequence Diagram

Sequence Diagram

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL