svc

package
Version: v0.0.0-...-197f44b Latest Latest
Warning

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

Go to latest
Published: May 4, 2020 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FORM_TEXT          = "text"
	FORM_FILE          = "file"
	ContentTypePattern = "^multipart/form-data; boundary=(.*)$"
)
View Source
const (
	MaxConnPerServer uint = 100
)

Variables

View Source
var (
	RegexContentTypePattern = regexp.MustCompile(ContentTypePattern)
)

Functions

func Add

func Add(fileId string) error

Add adds fileId to dataset database.

func BootAgentServer

func BootAgentServer()

BootAgentServer starts agent server.

func BootStorageServer

func BootStorageServer()

BootStorageServer starts storage server.

func BootTrackerServer

func BootTrackerServer()

BootTrackerServer starts tracker server.

func Contains

func Contains(fileId string) (bool, error)

Contains checks if the fileId exists in dataset database.

func DoIfNotExist

func DoIfNotExist(fileId string, work func() error) error

DoIfNotExist does work if the fileId not exists.

func InitFileSynchronization

func InitFileSynchronization()

InitFileSynchronization starts a timer job for file synchronization.

func InitStorageMemberBinlogWatcher

func InitStorageMemberBinlogWatcher()

InitStorageMemberBinlogWatcher initializes timer jobs for binlog and file synchronization.

func InitializeClientAPI

func InitializeClientAPI(config *api.Config)

InitializeClientAPI initializes client API.

func Remove

func Remove(fileId string) (bool, error)

Add removes fileId from dataset database.

func StartAgentHttpServer

func StartAgentHttpServer(c *common.AgentConfig)

StartStorageHttpServer starts an storage http server.

func StartAgentTcpServer

func StartAgentTcpServer()

func StartStorageHttpServer

func StartStorageHttpServer(c *common.StorageConfig)

StartStorageHttpServer starts an storage http server.

func StartStorageTcpServer

func StartStorageTcpServer()

func StartTrackerHttpServer

func StartTrackerHttpServer(c *common.TrackerConfig)

StartTrackerHttpServer starts a tracker http server.

func StartTrackerTcpServer

func StartTrackerTcpServer()

Types

type DigestProxyWriter

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

DigestProxyWriter is a writer proxy which can calculate crc and md5 for the stream file.

func (*DigestProxyWriter) Write

func (w *DigestProxyWriter) Write(p []byte) (n int, err error)

type FormEntry

type FormEntry struct {
	Index          int    `json:"index"`
	Type           string `json:"type"`
	ParameterName  string `json:"name"`
	ParameterValue string `json:"value"`
	Size           int64  `json:"size,omitempty"`
	Group          string `json:"group,omitempty"`
	InstanceId     string `json:"instanceId,omitempty"`
	Md5            string `json:"md5,omitempty"`
	FileId         string `json:"fileId,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL