Documentation ¶
Overview ¶
Copyright © 2021 The VolSync authors
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright © 2021 The VolSync authors ¶
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright © 2021 The VolSync authors ¶
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright © 2021 The VolSync authors ¶
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright © 2021 The VolSync authors ¶
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright © 2022 The VolSync authors ¶
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright © 2021 The VolSync authors ¶
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright © 2021 The VolSync authors ¶
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright © 2021 The VolSync authors ¶
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright © 2021 The VolSync authors ¶
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright © 2022 The VolSync authors ¶
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright © 2022 The VolSync authors ¶
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright © 2022 The VolSync authors ¶
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright © 2022 The VolSync authors ¶
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright © 2021 The VolSync authors ¶
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Index ¶
- Constants
- func Execute()
- type Relationship
- func (r *Relationship) AddIDLabel(object client.Object)
- func (r *Relationship) Delete() error
- func (r *Relationship) GetData(data interface{}) error
- func (r *Relationship) ID() uuid.UUID
- func (r *Relationship) Name() string
- func (r *Relationship) Save() error
- func (r *Relationship) SetData(data interface{}) error
- func (r *Relationship) Type() RelationshipType
- type RelationshipType
- type XClusterName
Constants ¶
const ( // RelationshipLabelKey is a label applied to objects that are created as a // part of a given relationship. The value of the key is the UUID of the // relationship. RelationshipLabelKey = "volsync.backube/relationship" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Relationship ¶
Relationship is the low-level structure that represents a volsync relationship. Each specific type will define its own fields and wrap this struct.
func CreateRelationshipFromCommand ¶
func CreateRelationshipFromCommand(cmd *cobra.Command, rType RelationshipType) (*Relationship, error)
CreateRelationshipFromCommand wraps the relationship creation, automatically extracting the config dir and name from the command flags.
func LoadRelationshipFromCommand ¶
func LoadRelationshipFromCommand(cmd *cobra.Command, rType RelationshipType) (*Relationship, error)
LoadRelationshipFromCommand wraps the relationship loading, automatically extracting the config dir and name from the command flags.
func (*Relationship) AddIDLabel ¶
func (r *Relationship) AddIDLabel(object client.Object)
func (*Relationship) Delete ¶
func (r *Relationship) Delete() error
Delete deletes a relationship's associated file.
func (*Relationship) GetData ¶
func (r *Relationship) GetData(data interface{}) error
Unmarshals the "data" subkey back into the provided struct, properly decoding any embedded resource.Quantity fields.
func (*Relationship) ID ¶
func (r *Relationship) ID() uuid.UUID
ID returns the UUID of this relationship.
func (*Relationship) Name ¶
func (r *Relationship) Name() string
Name retrieves the name of this relationship.
func (*Relationship) Save ¶
func (r *Relationship) Save() error
Save persists the relationship information into the associated relationship file. Prior to calling the save() method, the underlying Viper instance needs to be updated with the state that will be saved.
func (*Relationship) SetData ¶
func (r *Relationship) SetData(data interface{}) error
Sets the "data" subkey with the contents of a struct and flattens it so that individual values may be overridden
func (*Relationship) Type ¶
func (r *Relationship) Type() RelationshipType
Type returns the type of this relationship.
type RelationshipType ¶
type RelationshipType string
Each relationship type (e.g., replication, migration, backup, etc.) should define its own type string so that the load/save routines can ensure that the config files are used with the correct relationship type.
const MigrationRelationshipType RelationshipType = "migration"
MigrationRelationship defines the "type" of migration Relationships
const ReplicationRelationshipType RelationshipType = "replication"
type XClusterName ¶
XClusterName is the equivlent of NamespacedName, but also containing a cluster context
func ParseXClusterName ¶
func ParseXClusterName(name string) (*XClusterName, error)
Parses a string of the format [context/]namespace/name into an XClusterName
func (XClusterName) NamespacedName ¶
func (x XClusterName) NamespacedName() types.NamespacedName