Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeHandler ¶
MakeHandler returns a http.Handler that uses the storing.Service to make the http calls, it links eac http endpoint to a storing.Service method
Types ¶
type Membership ¶
type Membership interface { // Nodes return all the Nodes of the cluster except the current one Nodes() []*client.Client // NodesWithoutVolumeIDs return all the Nodes of the cluster except the current one that // do not have any of the provided vids NodesWithoutVolumeIDs(vids []string) []*client.Client // LocalVolumes returns only the local volumes LocalVolumes() []volume.Local // GetNodeWithVolumeByID returns the Node that has the // vid in his volumes GetNodeWithVolumeByID(vid string) (*client.Client, error) // GetNodeState returns the Staet of the Node GetNodeState(nn string) (*membership.State, error) // RemovedVolumeIDs returns a list of are the volumeIDs // that left the cluster RemovedVolumeIDs() []string // Leave makes it leave the cluster Leave() }
Membership is the interface that hides the logic behind the cluseter members. In this "domain" (rebost), the members are considered volume.Volume.
type Service ¶
type Service interface { volume.Volume // Config returns the current Service configuration Config(context.Context) (*config.Config, error) // CreateReplica creates a new File replica CreateReplica(ctx context.Context, key string, reader io.ReadCloser) (vID string, err error) }
Service is the interface of used to for the storing, it's the one that will be used when defining a client to consume the API
Click to show internal directories.
Click to hide internal directories.