core

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbstractService

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

func NewAbstractService

func NewAbstractService(name string, services map[string]Service) *AbstractService

func (*AbstractService) Close

func (t *AbstractService) Close()

func (*AbstractService) ConfigureRouter

func (t *AbstractService) ConfigureRouter(r *gin.RouterGroup)

func (*AbstractService) GetLogger

func (t *AbstractService) GetLogger() *logrus.Entry

func (*AbstractService) GetMode

func (t *AbstractService) GetMode() string

func (*AbstractService) GetName

func (t *AbstractService) GetName() string

func (*AbstractService) GetService

func (t *AbstractService) GetService(name string) Service

func (*AbstractService) IsDisabled

func (t *AbstractService) IsDisabled() bool

func (*AbstractService) SetDisabled

func (t *AbstractService) SetDisabled(value bool)

func (*AbstractService) SetMode

func (t *AbstractService) SetMode(value string)

type ClientFactory

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

func NewClientFactory

func NewClientFactory() (*ClientFactory, error)

func (*ClientFactory) GetSharedInstance

func (t *ClientFactory) GetSharedInstance() *docker.Client

func (*ClientFactory) NewInstance

func (t *ClientFactory) NewInstance() (*docker.Client, error)

type DockerClientFactory

type DockerClientFactory interface {
	GetSharedInstance() *docker.Client
	NewInstance() (*docker.Client, error)
}

type DockerEventListener

type DockerEventListener interface {
	OnEvent(type_ string)
}

type DockerTemplate

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

type Service

type Service interface {
	io.Closer
	DockerEventListener

	ConfigureRouter(r *gin.RouterGroup)

	GetName() string
	GetStatus(ctx context.Context) string
	GetContainerId() string
	IsDisabled() bool
	SetDisabled(value bool)
	GetMode() string
	SetMode(value string)

	GetLogs(since string, tail string) ([]string, error)
	FollowLogs(since string, tail string) (<-chan string, func(), error)
}

type SingleContainerService

type SingleContainerService struct {
	*AbstractService
	// contains filtered or unexported fields
}

func NewSingleContainerService

func NewSingleContainerService(
	name string,
	services map[string]Service,
	containerName string,
	dockerClient *docker.Client,
) *SingleContainerService

func (*SingleContainerService) Exec1

func (t *SingleContainerService) Exec1(command []string) (string, error)

func (*SingleContainerService) ExecInteractive

func (t *SingleContainerService) ExecInteractive(command []string) (string, io.Reader, io.Writer, error)

Exec1 is a shortcut function

func (*SingleContainerService) FollowLogs

func (t *SingleContainerService) FollowLogs(since string, tail string) (<-chan string, func(), error)

func (*SingleContainerService) FollowLogs2

func (t *SingleContainerService) FollowLogs2() (<-chan string, func(), error)

func (*SingleContainerService) GetContainer

func (t *SingleContainerService) GetContainer() (*types.ContainerJSON, error)

func (*SingleContainerService) GetContainerId

func (t *SingleContainerService) GetContainerId() string

func (*SingleContainerService) GetContainerStatus

func (t *SingleContainerService) GetContainerStatus() (string, error)

func (*SingleContainerService) GetLogs

func (t *SingleContainerService) GetLogs(since string, tail string) ([]string, error)

func (*SingleContainerService) GetStatus

func (t *SingleContainerService) GetStatus(ctx context.Context) string

GetStatus implements Service interface

func (*SingleContainerService) Getenv

func (t *SingleContainerService) Getenv(key string) (string, error)

func (*SingleContainerService) OnEvent

func (t *SingleContainerService) OnEvent(kind string)

func (*SingleContainerService) WaitContainer

func (t *SingleContainerService) WaitContainer() *types.ContainerJSON

func (*SingleContainerService) WaitContainerRunning

func (t *SingleContainerService) WaitContainerRunning() *types.ContainerJSON

Jump to

Keyboard shortcuts

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