You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
513 B
27 lines
513 B
package mysql |
|
|
|
import "github.com/juju/errors" |
|
|
|
type GTIDSet interface { |
|
String() string |
|
|
|
// Encode GTID set into binary format used in binlog dump commands |
|
Encode() []byte |
|
|
|
Equal(o GTIDSet) bool |
|
|
|
Contain(o GTIDSet) bool |
|
|
|
Update(GTIDStr string) error |
|
} |
|
|
|
func ParseGTIDSet(flavor string, s string) (GTIDSet, error) { |
|
switch flavor { |
|
case MySQLFlavor: |
|
return ParseMysqlGTIDSet(s) |
|
case MariaDBFlavor: |
|
return ParseMariadbGTIDSet(s) |
|
default: |
|
return nil, errors.Errorf("invalid flavor %s", flavor) |
|
} |
|
}
|
|
|