@@ -18,35 +18,53 @@ type EmbeddingConfig struct {
1818}
1919
2020type ConfigSyncSource struct {
21- ReplicaSet ConfigReplicaSet `json:"replicaSet" yaml:"replicaSet"`
22- Router * ConfigRouter `json:"router,omitempty" yaml:"router,omitempty"`
23- CertificateAuthorityFile * string `json:"caFile ,omitempty" yaml:"caFile ,omitempty"`
21+ ReplicaSet ConfigReplicaSet `json:"replicaSet" yaml:"replicaSet"`
22+ Router * ConfigRouter `json:"router,omitempty" yaml:"router,omitempty"`
23+ ReplicationReader * ConfigReplicationReader `json:"replicationReader ,omitempty" yaml:"replicationReader ,omitempty"`
2424}
2525
26- type ConfigRouter struct {
27- HostAndPort []string `json:"hostAndPort" yaml:"hostAndPort"`
28- Username string `json:"username,omitempty" yaml:"username,omitempty"`
29- PasswordFile string `json:"passwordFile,omitempty" yaml:"passwordFile,omitempty"`
30- TLS * bool `json:"tls,omitempty" yaml:"tls,omitempty"`
31- AuthSource * string `json:"authSource,omitempty" yaml:"authSource,omitempty"`
32- X509 * ConfigX509 `json:"x509,omitempty" yaml:"x509,omitempty"`
26+ type ConfigReplicationReader struct {
27+ ReadPreference * string `json:"readPreference,omitempty" yaml:"readPreference,omitempty"`
28+ TagSets [][]ConfigTag `json:"tagSets,omitempty" yaml:"tagSets,omitempty"`
3329}
3430
35- type ConfigReplicaSet struct {
36- HostAndPort []string `json:"hostAndPort" yaml:"hostAndPort"`
37- Username string `json:"username,omitempty" yaml:"username,omitempty"`
38- PasswordFile string `json:"passwordFile,omitempty" yaml:"passwordFile,omitempty"`
39- TLS * bool `json:"tls,omitempty" yaml:"tls,omitempty"`
40- ReadPreference * string `json:"readPreference,omitempty" yaml:"readPreference,omitempty"`
41- AuthSource * string `json:"authSource,omitempty" yaml:"authSource,omitempty"`
42- X509 * ConfigX509 `json:"x509,omitempty" yaml:"x509,omitempty"`
31+ type ConfigTag struct {
32+ Name string `json:"name" yaml:"name,omitempty"`
33+ Value string `json:"value" yaml:"value,omitempty"`
34+ }
35+
36+ type ScramAuthTLS struct {
37+ Enabled bool `json:"enabled" yaml:"enabled,omitempty"`
38+ TLSCertificateKeyFile * string `json:"tlsCertificateKeyFile,omitempty" yaml:"tlsCertificateKeyFile,omitempty"`
39+ TLSCertificateKeyFilePasswordFile * string `json:"tlsCertificateKeyFilePasswordFile,omitempty" yaml:"tlsCertificateKeyFilePasswordFile,omitempty"`
40+ CertificateAuthorityFile * string `json:"caFile,omitempty" yaml:"caFile,omitempty"`
41+ }
42+
43+ type ConfigScramAuth struct {
44+ Username string `json:"username" yaml:"username,omitempty"`
45+ PasswordFile string `json:"passwordFile" yaml:"passwordFile,omitempty"`
46+ TLS * ScramAuthTLS `json:"tls,omitempty" yaml:"tls,omitempty"`
47+ AuthSource * string `json:"authSource,omitempty" yaml:"authSource,omitempty"`
4348}
4449
4550type ConfigX509 struct {
51+ CertificateAuthorityFile * string `json:"caFile,omitempty" yaml:"caFile,omitempty"`
4652 TLSCertificateKeyFile * string `json:"tlsCertificateKeyFile,omitempty" yaml:"tlsCertificateKeyFile,omitempty"`
4753 TLSCertificateKeyFilePasswordFile * string `json:"tlsCertificateKeyFilePasswordFile,omitempty" yaml:"tlsCertificateKeyFilePasswordFile,omitempty"`
4854}
4955
56+ type ConfigRouter struct {
57+ HostAndPort []string `json:"hostAndPort" yaml:"hostAndPort"`
58+ X509 * ConfigX509 `json:"x509,omitempty" yaml:"x509,omitempty"`
59+ ScramAuth * ConfigScramAuth `json:"scramAuth,omitempty" yaml:"scramAuth,omitempty"`
60+ }
61+
62+ type ConfigReplicaSet struct {
63+ HostAndPort []string `json:"hostAndPort" yaml:"hostAndPort"`
64+ X509 * ConfigX509 `json:"x509,omitempty" yaml:"x509,omitempty"`
65+ ScramAuth * ConfigScramAuth `json:"scramAuth,omitempty" yaml:"scramAuth,omitempty"`
66+ }
67+
5068type ConfigStorage struct {
5169 DataPath string `json:"dataPath" yaml:"dataPath"`
5270}
0 commit comments