edge

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

README

edge

Packetframe anycast container orchestration service

API Reference:
Create a container

POST /containers

Required parameters:

Name Description Validation
image Docker image path
ports List of port map entries ("80:8080") "uint16:uint16"
env Environment map (string to string)

Example response (HTTP 200):

{
  "message": "Container created"
}
Delete a container

DELETE /containers/:container

Required parameters: None

Example response (HTTP 200):

{
  "message": "Container deleted"
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterValidators

func RegisterValidators(validate *validator.Validate) error

RegisterValidators registers custom container validation handlers with the validator

Types

type Container

type Container struct {
	ID    primitive.ObjectID   `json:"id" bson:"_id,omitempty"`
	Users []primitive.ObjectID `json:"users"`
	Image string               `json:"image" validate:"required"`
	Ports []string             `json:"ports" validate:"required,portmap"`
	Env   map[string]string    `json:"env"`
}

Container stores a single container

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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