Documentation ¶
Index ¶
- Constants
- Variables
- func Add(fileId string) error
- func BootAgentServer()
- func BootStorageServer()
- func BootTrackerServer()
- func Contains(fileId string) (bool, error)
- func DoIfNotExist(fileId string, work func() error) error
- func InitFileSynchronization()
- func InitStorageMemberBinlogWatcher()
- func InitializeClientAPI(config *api.Config)
- func Remove(fileId string) (bool, error)
- func StartAgentHttpServer(c *common.AgentConfig)
- func StartAgentTcpServer()
- func StartStorageHttpServer(c *common.StorageConfig)
- func StartStorageTcpServer()
- func StartTrackerHttpServer(c *common.TrackerConfig)
- func StartTrackerTcpServer()
- type DigestProxyWriter
- type FormEntry
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 DoIfNotExist ¶
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 ¶
InitializeClientAPI initializes client API.
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.
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"` }
Click to show internal directories.
Click to hide internal directories.