Documentation
¶
Index ¶
- func Branch(url, commit, branch string, t *testing.T)
- func Check(err error, t *testing.T)
- func CheckNoFile(url, name, commit string, t *testing.T)
- func CheckResp(res *http.Response, expected string, t *testing.T)
- func Checkfile(url, name, commit, data string, t *testing.T)
- func Commit(url, commit, branch string, t *testing.T)
- func RunOp(url string, o traffic.Op, t *testing.T)
- func RunWorkload(url string, w traffic.Workload, t *testing.T)
- func SyncFrom(dataRepo string, urls []string) error
- func SyncTo(dataRepo string, urls []string) error
- func WriteFile(url, name, branch, data string, t *testing.T)
- type BranchMsg
- type CommitMsg
- type MultiPartPuller
- type MultipartReplica
- type Shard
- func (s *Shard) BranchHandler(w http.ResponseWriter, r *http.Request)
- func (s *Shard) CommitHandler(w http.ResponseWriter, r *http.Request)
- func (s *Shard) EnsureRepos() error
- func (s *Shard) FileHandler(w http.ResponseWriter, r *http.Request)
- func (s *Shard) FillRole(cancel chan struct{}) error
- func (s *Shard) JobHandler(w http.ResponseWriter, r *http.Request)
- func (s *Shard) Peers() ([]string, error)
- func (s *Shard) PipelineHandler(w http.ResponseWriter, r *http.Request)
- func (s *Shard) PullHandler(w http.ResponseWriter, r *http.Request)
- func (s *Shard) RunServer()
- func (s *Shard) ShardMux() *http.ServeMux
- func (s *Shard) SyncFromPeers() error
- func (s *Shard) SyncToPeers() error
- type ShardReplica
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckNoFile ¶
func SyncFrom ¶
SyncFrom syncs from the most up to date replica in urls Returns the first error if ALL urls error.
Types ¶
type MultiPartPuller ¶
type MultiPartPuller struct {
// contains filtered or unexported fields
}
func NewMultiPartPuller ¶
func NewMultiPartPuller(r *multipart.Reader) MultiPartPuller
type MultipartReplica ¶
type MultipartReplica struct {
// contains filtered or unexported fields
}
func NewMultipartReplica ¶
func NewMultipartReplica(w *multipart.Writer) MultipartReplica
type Shard ¶
type Shard struct {
// contains filtered or unexported fields
}
func ShardFromArgs ¶
func (*Shard) BranchHandler ¶
func (s *Shard) BranchHandler(w http.ResponseWriter, r *http.Request)
BranchHandler creates a new branch from commit.
func (*Shard) CommitHandler ¶
func (s *Shard) CommitHandler(w http.ResponseWriter, r *http.Request)
CommitHandler creates a snapshot of outstanding changes.
func (*Shard) EnsureRepos ¶
func (*Shard) FileHandler ¶
func (s *Shard) FileHandler(w http.ResponseWriter, r *http.Request)
FileHandler is the core route for modifying the contents of the fileystem.
func (*Shard) FillRole ¶
FillRole attempts to find a role in the cluster. Once on is found it prepares the local storage for the role and announces the shard to the rest of the cluster. This function will loop until `cancel` is closed.
func (*Shard) JobHandler ¶
func (s *Shard) JobHandler(w http.ResponseWriter, r *http.Request)
func (*Shard) PipelineHandler ¶
func (s *Shard) PipelineHandler(w http.ResponseWriter, r *http.Request)
func (*Shard) PullHandler ¶
func (s *Shard) PullHandler(w http.ResponseWriter, r *http.Request)
func (*Shard) RunServer ¶
func (s *Shard) RunServer()
RunServer runs a shard server listening on port 80
func (*Shard) SyncFromPeers ¶
func (*Shard) SyncToPeers ¶
type ShardReplica ¶
type ShardReplica struct {
// contains filtered or unexported fields
}
func NewShardReplica ¶
func NewShardReplica(url string) ShardReplica
Click to show internal directories.
Click to hide internal directories.