server2

package
v0.0.0-...-f4cebfc Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2020 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(opt *Option)

Types

type Config

type Config struct {
	Port     int
	Insecure bool
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig() *Config

type MicroServer

type MicroServer struct {
	DockerClient *dockerclient.DockerClient
	// contains filtered or unexported fields
}

func New

func New(addr string, l net.Listener) *MicroServer

func (*MicroServer) BuildDockerImage

func (*MicroServer) BuildDockerImageStreaming

func (ms *MicroServer) BuildDockerImageStreaming(streaming pb.SimpleService_BuildDockerImageStreamingServer) error

func (*MicroServer) ConnectDockerNetwork

func (ms *MicroServer) ConnectDockerNetwork(ctx context.Context) error

func (*MicroServer) ContainerLogs

func (ms *MicroServer) ContainerLogs(ctx context.Context) error

func (*MicroServer) CreateContainer

func (ms *MicroServer) CreateContainer(ctx context.Context) error

func (*MicroServer) CreateDockerNetwork

func (*MicroServer) DisconnectDockerNetwork

func (ms *MicroServer) DisconnectDockerNetwork(ctx context.Context) error

func (*MicroServer) ImageHistory

func (ms *MicroServer) ImageHistory(ctx context.Context) error

func (*MicroServer) InspectContainerWithSize

func (ms *MicroServer) InspectContainerWithSize(ctx context.Context) error

func (*MicroServer) InspectDockerContainer

func (*MicroServer) InspectDockerImage

func (*MicroServer) InspectDockerNetwork

func (*MicroServer) InspectImageById

func (ms *MicroServer) InspectImageById(ctx context.Context) error

func (*MicroServer) InspectImageByRef

func (ms *MicroServer) InspectImageByRef(ctx context.Context) error

func (*MicroServer) ListDockerContainers

func (*MicroServer) ListDockerImages

func (ms *MicroServer) ListDockerImages(ctx context.Context, req *pb.DockerImageListReqResp) (*pb.DockerImageListReqResp, error)

func (*MicroServer) ListDockerNetworks

func (*MicroServer) PruneDockerContainers

func (*MicroServer) PruneDockerImages

func (*MicroServer) PruneDockerNetworks

func (*MicroServer) PullDockerImage

func (*MicroServer) PullDockerImageStreaming

func (ms *MicroServer) PullDockerImageStreaming(req *pb.DockerImagePullReqResp, streaming pb.SimpleService_PullDockerImageStreamingServer) error

func (*MicroServer) PushDockerImage

func (*MicroServer) PushDockerImageStreaming

func (ms *MicroServer) PushDockerImageStreaming(streaming pb.SimpleService_PushDockerImageStreamingServer) error

func (*MicroServer) RemoveDockerContainer

func (*MicroServer) RemoveDockerImage

func (*MicroServer) RemoveDockerNetwork

func (*MicroServer) RunDockerContainer

func (*MicroServer) Start

func (ms *MicroServer) Start() error

func (*MicroServer) StartContainer

func (ms *MicroServer) StartContainer(ctx context.Context) error

func (*MicroServer) StopContainer

func (ms *MicroServer) StopContainer(ctx context.Context) error

func (*MicroServer) UpdateContainerResources

func (ms *MicroServer) UpdateContainerResources(ctx context.Context) error

type Option

type Option struct {
	LogLevel       string
	DockerEndpoint string
}

func NewOption

func NewOption() *Option

type User

type User struct {
	ID   string `json:"id" description:"identifier of the user"`
	Name string `json:"name" description:"name of the user" default:"john"`
	Age  int    `json:"age" description:"age of the user" default:"21"`
}

User is just a sample type

type UserResource

type UserResource struct {
	// contains filtered or unexported fields
}

UserResource is the REST layer to the User domain

func (UserResource) WebService

func (u UserResource) WebService() *restful.WebService

WebService creates a new service that can handle REST requests for User resources.

Jump to

Keyboard shortcuts

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