Documentation ¶
Index ¶
- type Config
- type Coordinator
- func (c *Coordinator) Capabilities() []selector.Capability
- func (c *Coordinator) Close() error
- func (c *Coordinator) CreateIfNotExist(key string) error
- func (c *Coordinator) CreateOrReset(key string) error
- func (c *Coordinator) Info(key string) ([][]byte, coordinator.Info, error)
- func (c *Coordinator) Location() string
- func (c *Coordinator) SetBackend(_ coordinator.Coordinator)
- func (c *Coordinator) SetLandmark(key string, mark coordinator.Landmark) error
- func (c *Coordinator) String() string
- func (c *Coordinator) UpdateEnd(key string, tid string, record []byte) error
- func (c *Coordinator) UpdateStart(key string, tid string, intentions coordinator.IntentionRecord) error
- func (c *Coordinator) ViewEnd(tids []string) error
- func (c *Coordinator) ViewStart(key string, filter []string) (records [][]byte, tids []string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ID string `validate:"required"` Parameters *viper.Viper `validate:"required"` Hub *hub.Hub `validate:"required"` }
Config defines the running paramers of the Coordinator
type Coordinator ¶
type Coordinator struct {
// contains filtered or unexported fields
}
Coordinator is a virtual proxy composed out of several coordinator.Coordinator processing layers
func New ¶
func New(config Config) (*Coordinator, error)
New returns a logical proxy Coordinator. It is used to store metadata to third-party databases
func (*Coordinator) Capabilities ¶
func (c *Coordinator) Capabilities() []selector.Capability
Capabilities returns the capabilities of the Coordinator
func (*Coordinator) CreateIfNotExist ¶
func (c *Coordinator) CreateIfNotExist(key string) error
CreateIfNotExist creates a new logical file if it does not exists. If it exists, it returns an error
func (*Coordinator) CreateOrReset ¶
func (c *Coordinator) CreateOrReset(key string) error
CreateOrReset creates a new logical file if it does not exist. If it exists, it resets all of the contents
func (*Coordinator) Info ¶
func (c *Coordinator) Info(key string) ([][]byte, coordinator.Info, error)
Info returns information for the key
func (*Coordinator) Location ¶
func (c *Coordinator) Location() string
Location returns the node where the Coordinator is running
func (*Coordinator) SetBackend ¶
func (c *Coordinator) SetBackend(_ coordinator.Coordinator)
SetBackend defines the backend for the current device layer
func (*Coordinator) SetLandmark ¶
func (c *Coordinator) SetLandmark(key string, mark coordinator.Landmark) error
SetLandmark appends a landmark to the update log.
func (*Coordinator) String ¶
func (c *Coordinator) String() string
String returns a descriptor for the current device layer
func (*Coordinator) UpdateEnd ¶
func (c *Coordinator) UpdateEnd(key string, tid string, record []byte) error
UpdateEnd appends a new entry on the update log to store metadata of a client transaction (tid). Once the write is complete, it atomically removes the respective entry from the transaction log
func (*Coordinator) UpdateStart ¶
func (c *Coordinator) UpdateStart(key string, tid string, intentions coordinator.IntentionRecord) error
UpdateStart initiates a new transaction for writing to the logical file. It appends the intentions to the transaction log of the logical file identified by key
func (*Coordinator) ViewEnd ¶
func (c *Coordinator) ViewEnd(tids []string) error
ViewEnd removes the leases allocated during ViewStart