weed_server

package
v0.0.0-...-9931aa1 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2018 License: Apache-2.0 Imports: 51 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilerPostResult

type FilerPostResult struct {
	Name  string `json:"name,omitempty"`
	Size  uint32 `json:"size,omitempty"`
	Error string `json:"error,omitempty"`
	Fid   string `json:"fid,omitempty"`
	Url   string `json:"url,omitempty"`
}

type FilerServer

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

func NewFilerServer

func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, ip string, port int, master string, dir string, collection string,
	replication string, redirectOnRead bool, disableDirListing bool,
	confFile string,
	maxMB int,
	secret string,
	cassandra_server string, cassandra_keyspace string,
	redis_server string, redis_password string, redis_database int,
) (fs *FilerServer, err error)

func (*FilerServer) DeleteHandler

func (fs *FilerServer) DeleteHandler(w http.ResponseWriter, r *http.Request)

curl -X DELETE http://localhost:8888/path/to curl -X DELETE http://localhost:8888/path/to/?recursive=true

func (*FilerServer) GetOrHeadHandler

func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request, isGetMethod bool)

func (*FilerServer) PostHandler

func (fs *FilerServer) PostHandler(w http.ResponseWriter, r *http.Request)

type MasterServer

type MasterServer struct {
	Topo *topology.Topology
	// contains filtered or unexported fields
}

func NewMasterServer

func NewMasterServer(r *mux.Router, port int, metaFolder string,
	volumeSizeLimitMB uint,
	preallocate bool,
	pulseSeconds int,
	defaultReplicaPlacement string,
	garbageThreshold string,
	whiteList []string,
	secureKey string,
) *MasterServer

func (*MasterServer) HasWritableVolume

func (ms *MasterServer) HasWritableVolume(option *topology.VolumeGrowOption) bool

func (MasterServer) SendHeartbeat

func (ms MasterServer) SendHeartbeat(stream pb.Seaweed_SendHeartbeatServer) error

func (*MasterServer) SetRaftServer

func (ms *MasterServer) SetRaftServer(raftServer *RaftServer)

type RaftServer

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

func NewRaftServer

func NewRaftServer(r *mux.Router, peers []string, httpAddr string, dataDir string, topo *topology.Topology, pulseSeconds int) *RaftServer

func (*RaftServer) HandleFunc

func (s *RaftServer) HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))

func (*RaftServer) Join

func (s *RaftServer) Join(peers []string) error

Join joins an existing cluster.

func (*RaftServer) Peers

func (s *RaftServer) Peers() (members []string)

type VolumeServer

type VolumeServer struct {
	FixJpgOrientation bool
	ReadRedirect      bool
	// contains filtered or unexported fields
}

func NewVolumeServer

func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
	port int, publicUrl string,
	folders []string, maxCounts []int,
	needleMapKind storage.NeedleMapType,
	masterNode string, pulseSeconds int,
	dataCenter string, rack string,
	whiteList []string,
	fixJpgOrientation bool,
	readRedirect bool) *VolumeServer

func (*VolumeServer) DeleteHandler

func (vs *VolumeServer) DeleteHandler(w http.ResponseWriter, r *http.Request)

func (*VolumeServer) FaviconHandler

func (vs *VolumeServer) FaviconHandler(w http.ResponseWriter, r *http.Request)

func (*VolumeServer) GetMasterNode

func (vs *VolumeServer) GetMasterNode() string

func (*VolumeServer) GetOrHeadHandler

func (vs *VolumeServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request)

func (*VolumeServer) PostHandler

func (vs *VolumeServer) PostHandler(w http.ResponseWriter, r *http.Request)

func (*VolumeServer) SetMasterNode

func (vs *VolumeServer) SetMasterNode(masterNode string)

func (*VolumeServer) Shutdown

func (vs *VolumeServer) Shutdown()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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