handler.go ×4

Frontier kind: Code frontier

unlabeled · c_3789e904a1cd

7 tests · 2070 LOC · 83 files · introduces 0 tests · 170 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges170 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
280 ranges2070 lines · 83 files · Browse complete extent
All tests (intent)
7 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Introduced files, introduced tests, and structurally relevant concept specializationupdate_task_tests.go ×1 · 6 introduced LOCupdate_task_tests.go ×1cqlclient.go ×4 · 17 introduced LOCcqlclient.go ×4handler.go ×4 · 18 introduced LOChandler.go ×4handler.go ×1 · 8 introduced LOChandler.go ×1schema_version_reader.go ×4 · 77 introduced LOCschema_version_reader.go…handler.go ×4 · 12 introduced LOChandler.go ×4handler.go ×4 · 14 introduced LOChandler.go ×4setup_task_tests.go ×3 · 9 introduced LOCsetup_task_tests.go ×3main.go ×1 · 4 introduced LOCmain.go ×1handler.go ×1 · 4 introduced LOChandler.go ×1handler.go ×2 · 15 introduced LOChandler.go ×2main.go ×1 · 2 introduced LOCmain.go ×1handler.go ×2 · 8 introduced LOChandler.go ×2embed.go ×1 · 1 introduced LOCembed.go ×1handler.go ×6 · 7 introduced LOChandler.go ×6env.go ×2 · 11 introduced LOCenv.go ×2env.go ×2 · 5 introduced LOCenv.go ×2embed.go ×1 · 2 introduced LOCembed.go ×1handler.go ×1 · 2 introduced LOChandler.go ×1data_interfaces.go ×3 · 6 introduced LOCdata_interfaces.go ×3fixed_address_translator.go ×2 · 9 introduced LOCfixed_address_translator…noop_moving_window_average.go ×1 · 2 introduced LOCnoop_moving_window_avera…search_attribute.go ×12 · 121 introduced LOCsearch_attribute.go ×12key.go ×1 · 6 introduced LOCkey.go ×1priority.go ×1 · 3 introduced LOCpriority.go ×1setting_gen.go ×51 · 335 introduced LOCsetting_gen.go ×51grpc_resolver.go ×2 · 7 introduced LOCgrpc_resolver.go ×2predicates.pb.go ×21 · 54 introduced LOCpredicates.pb.go ×21service.pb.go ×2 · 342 introduced LOCservice.pb.go ×2message.pb.go ×2 · 20 introduced LOCmessage.pb.go ×2constants.go ×1 · 6 introduced LOCconstants.go ×1task.pb.go ×1 · 3 introduced LOCtask.pb.go ×1message.pb.go ×2 · 442 introduced LOCmessage.pb.go ×2defs.go ×5 · 91 introduced LOCdefs.go ×5embed.go ×5 · 14 introduced LOCembed.go ×5zap_logger.go ×1 · 1 introduced LOCzap_logger.go ×1zap_logger.go ×4 · 12 introduced LOCzap_logger.go ×4zap_logger.go ×2 · 33 introduced LOCzap_logger.go ×2embed.go ×1 · 3 introduced LOCembed.go ×1zap_logger.go ×1 · 2 introduced LOCzap_logger.go ×1zap_logger.go ×1 · 7 introduced LOCzap_logger.go ×1tags.go ×9 · 37 introduced LOCtags.go ×9message.pb.go ×2 · 49 introduced LOCmessage.pb.go ×2cluster.pb.go ×2 · 200 introduced LOCcluster.pb.go ×2wildcard.go ×1 · 2 introduced LOCwildcard.go ×1wildcard.go ×4 · 14 introduced LOCwildcard.go ×4env.go ×1 · 2 introduced LOCenv.go ×1retrypolicy.go ×3 · 19 introduced LOCretrypolicy.go ×3env.go ×1 · 2 introduced LOCenv.go ×1message.pb.go ×2 · 20 introduced LOCmessage.pb.go ×2env.go ×1 · 5 introduced LOCenv.go ×1payload.go ×1 · 3 introduced LOCpayload.go ×1TestOperatorServiceMetadata, TestWorkflowServiceMetadata · 0 introduced LOCTestOperatorServiceMetad…go.temporal.io/server/api/adminservice/v1/request_response.pb.go · 6661 LOCv1/request_response.pb.g…go.temporal.io/server/api/adminservice/v1/service.pb.go · 297 LOCv1/service.pb.gogo.temporal.io/server/api/chasm/v1/message.pb.go · 230 LOCv1/message.pb.gogo.temporal.io/server/api/clock/v1/message.pb.go · 217 LOCv1/message.pb.gogo.temporal.io/server/api/cluster/v1/message.pb.go · 366 LOCv1/message.pb.gogo.temporal.io/server/api/common/v1/api_category.pb.go · 230 LOCv1/api_category.pb.gogo.temporal.io/server/api/common/v1/dlq.pb.go · 319 LOCv1/dlq.pb.gogo.temporal.io/server/api/deployment/v1/message.pb.go · 4650 LOCv1/message.pb.gogo.temporal.io/server/api/enums/v1/cluster.pb.go · 233 LOCv1/cluster.pb.gogo.temporal.io/server/api/enums/v1/common.pb.go · 288 LOCv1/common.pb.gogo.temporal.io/server/api/enums/v1/dlq.pb.go · 211 LOCv1/dlq.pb.gogo.temporal.io/server/api/enums/v1/fairness_state.pb.go · 147 LOCv1/fairness_state.pb.gogo.temporal.io/server/api/enums/v1/nexus.pb.go · 182 LOCv1/nexus.pb.gogo.temporal.io/server/api/enums/v1/predicate.pb.go · 194 LOCv1/predicate.pb.gogo.temporal.io/server/api/enums/v1/replication.pb.go · 338 LOCv1/replication.pb.gogo.temporal.io/server/api/enums/v1/task.pb.go · 480 LOCv1/task.pb.gogo.temporal.io/server/api/enums/v1/workflow.pb.go · 299 LOCv1/workflow.pb.gogo.temporal.io/server/api/enums/v1/workflow_task_type.pb.go · 148 LOCv1/workflow_task_type.pb…go.temporal.io/server/api/errordetails/v1/message.pb.go · 649 LOCv1/message.pb.gogo.temporal.io/server/api/health/v1/message.pb.go · 324 LOCv1/message.pb.gogo.temporal.io/server/api/history/v1/message.pb.go · 522 LOCv1/message.pb.gogo.temporal.io/server/api/historyservice/v1/request_response.pb.go · 12003 LOCv1/request_response.pb.g…go.temporal.io/server/api/historyservice/v1/service.pb.go · 452 LOCv1/service.pb.gogo.temporal.io/server/api/matchingservice/v1/request_response.pb.go · 6878 LOCv1/request_response.pb.g…go.temporal.io/server/api/matchingservice/v1/service.pb.go · 274 LOCv1/service.pb.gogo.temporal.io/server/api/metrics/v1/message.pb.go · 128 LOCv1/message.pb.gogo.temporal.io/server/api/namespace/v1/message.pb.go · 138 LOCv1/message.pb.gogo.temporal.io/server/api/persistence/v1/chasm.pb.go · 1215 LOCv1/chasm.pb.gogo.temporal.io/server/api/persistence/v1/chasm_visibility.pb.go · 170 LOCv1/chasm_visibility.pb.g…go.temporal.io/server/api/persistence/v1/cluster_metadata.pb.go · 313 LOCv1/cluster_metadata.pb.g…go.temporal.io/server/api/persistence/v1/executions.pb.go · 5768 LOCv1/executions.pb.gogo.temporal.io/server/api/persistence/v1/history_tree.pb.go · 298 LOCv1/history_tree.pb.gogo.temporal.io/server/api/persistence/v1/hsm.pb.go · 929 LOCv1/hsm.pb.gogo.temporal.io/server/api/persistence/v1/namespaces.pb.go · 560 LOCv1/namespaces.pb.gogo.temporal.io/server/api/persistence/v1/nexus.pb.go · 509 LOCv1/nexus.pb.gogo.temporal.io/server/api/persistence/v1/predicates.go-helpers.pb.go · 413 LOCv1/predicates.go-helpers…go.temporal.io/server/api/persistence/v1/predicates.pb.go · 864 LOCv1/predicates.pb.gogo.temporal.io/server/api/persistence/v1/queue_metadata.pb.go · 129 LOCv1/queue_metadata.pb.gogo.temporal.io/server/api/persistence/v1/queues.pb.go · 641 LOCv1/queues.pb.gogo.temporal.io/server/api/persistence/v1/task_queues.pb.go · 924 LOCv1/task_queues.pb.gogo.temporal.io/server/api/persistence/v1/tasks.pb.go · 870 LOCv1/tasks.pb.gogo.temporal.io/server/api/persistence/v1/update.pb.go · 455 LOCv1/update.pb.gogo.temporal.io/server/api/persistence/v1/workflow_mutable_state.pb.go · 560 LOCv1/workflow_mutable_stat…go.temporal.io/server/api/replication/v1/message.pb.go · 2481 LOCv1/message.pb.gogo.temporal.io/server/api/taskqueue/v1/message.pb.go · 1363 LOCv1/message.pb.gogo.temporal.io/server/api/token/v1/message.pb.go · 809 LOCv1/message.pb.gogo.temporal.io/server/api/visibilityservice/v1/request_response.pb.go · 426 LOCv1/request_response.pb.g…go.temporal.io/server/api/workflow/v1/message.pb.go · 302 LOCv1/message.pb.gogo.temporal.io/server/chasm/library.go · 60 LOCchasm/library.gogo.temporal.io/server/chasm/registrable_component.go · 233 LOCchasm/registrable_compon…go.temporal.io/server/chasm/search_attribute.go · 525 LOCchasm/search_attribute.g…go.temporal.io/server/common/aggregate/noop_moving_window_average.go · 13 LOCaggregate/noop_moving_wi…go.temporal.io/server/common/backoff/retrypolicy.go · 347 LOCbackoff/retrypolicy.gogo.temporal.io/server/common/build/build.go · 56 LOCbuild/build.gogo.temporal.io/server/common/dynamicconfig/collection.go · 779 LOCdynamicconfig/collection…go.temporal.io/server/common/dynamicconfig/deepcopy.go · 78 LOCdynamicconfig/deepcopy.g…go.temporal.io/server/common/dynamicconfig/gradual_change.go · 196 LOCdynamicconfig/gradual_ch…go.temporal.io/server/common/dynamicconfig/key.go · 21 LOCdynamicconfig/key.gogo.temporal.io/server/common/dynamicconfig/registry.go · 44 LOCdynamicconfig/registry.g…go.temporal.io/server/common/dynamicconfig/setting_gen.go · 1972 LOCdynamicconfig/setting_ge…go.temporal.io/server/common/dynamicconfig/shared_structure.go · 69 LOCdynamicconfig/shared_str…go.temporal.io/server/common/log/tag/tags.go · 1039 LOCtag/tags.gogo.temporal.io/server/common/log/tag/zap_tag.go · 242 LOCtag/zap_tag.gogo.temporal.io/server/common/log/zap_logger.go · 318 LOClog/zap_logger.gogo.temporal.io/server/common/membership/grpc_resolver.go · 169 LOCmembership/grpc_resolver…go.temporal.io/server/common/metrics/defs.go · 76 LOCmetrics/defs.gogo.temporal.io/server/common/metrics/defs_base.go · 30 LOCmetrics/defs_base.gogo.temporal.io/server/common/metrics/noop_impl.go · 58 LOCmetrics/noop_impl.gogo.temporal.io/server/common/metrics/option.go · 21 LOCmetrics/option.gogo.temporal.io/server/common/metrics/registry.go · 75 LOCmetrics/registry.gogo.temporal.io/server/common/payload/payload.go · 127 LOCpayload/payload.gogo.temporal.io/server/common/persistence/cassandra/schema_version_reader.go · 41 LOCcassandra/schema_version…go.temporal.io/server/common/persistence/cassandra/version_checker.go · 62 LOCcassandra/version_checke…go.temporal.io/server/common/persistence/data_interfaces.go · 1453 LOCpersistence/data_interfa…go.temporal.io/server/common/persistence/noop_health_signal_aggregator.go · 31 LOCpersistence/noop_health_…go.temporal.io/server/common/persistence/nosql/nosqlplugin/cassandra/translator/fixed_address_translator.go · 84 LOCtranslator/fixed_address…go.temporal.io/server/common/persistence/nosql/nosqlplugin/cassandra/translator/translator_plugin.go · 35 LOCtranslator/translator_pl…go.temporal.io/server/common/searchattribute/sadefs/constants.go · 396 LOCsadefs/constants.gogo.temporal.io/server/common/tasks/priority.go · 81 LOCtasks/priority.gogo.temporal.io/server/common/util/wildcard.go · 50 LOCutil/wildcard.gogo.temporal.io/server/schema/embed.go · 66 LOCschema/embed.gogo.temporal.io/server/service/history/tasks/key.go · 144 LOCtasks/key.gogo.temporal.io/server/temporal/environment/env.go · 165 LOCenvironment/env.gogo.temporal.io/server/tools/cassandra/cqlclient.go · 305 LOCcassandra/cqlclient.gogo.temporal.io/server/tools/cassandra/handler.go · 233 LOCcassandra/handler.gogo.temporal.io/server/tools/cassandra/main.go · 273 LOCcassandra/main.gogo.temporal.io/server/tools/cassandra/setup_task_tests.go · 39 LOCcassandra/setup_task_tes…go.temporal.io/server/tools/cassandra/update_task_tests.go · 39 LOCcassandra/update_task_te…go.temporal.io/server/tools/cassandra/version_tests.go · 77 LOCcassandra/version_tests.…TestOperatorServiceMetadata · introduced test · go.temporal.io/server/common/api/TestOperatorServiceMetadataTestOperatorServiceMetad…TestWorkflowServiceMetadata · introduced test · go.temporal.io/server/common/api/TestWorkflowServiceMetadataTestWorkflowServiceMetad…TestTSCBWithDynamicSettings · introduced test · go.temporal.io/server/common/circuitbreaker/TestTSCBWithDynamicSettingsTestTSCBWithDynamicSetti…TestDeepCopy_OtherReferenceTypes_Nil · introduced test · go.temporal.io/server/common/dynamicconfig/TestDeepCopy_OtherReferenceTypes_NilTestDeepCopy_OtherRefere…TestMutexMapBaggage · introduced test · go.temporal.io/server/common/metrics/TestBaggageBenchSuite/TestMutexMapBaggageTestMutexMapBaggageTestSyncMapBaggage · introduced test · go.temporal.io/server/common/metrics/TestBaggageBenchSuite/TestSyncMapBaggageTestSyncMapBaggageTestSchemaDirs · introduced test · go.temporal.io/server/schema/TestSchemaDirsTestSchemaDirsTestAPIPrioritiesOrdered · introduced test · go.temporal.io/server/service/matching/configs/TestQuotasSuite/TestAPIPrioritiesOrderedTestAPIPrioritiesOrderedTestAPIToPriorityMapping · introduced test · go.temporal.io/server/service/matching/configs/TestQuotasSuite/TestAPIToPriorityMappingTestAPIToPriorityMappingTestLookupLocalhostIPSuccess · introduced test · go.temporal.io/server/temporal/environment/TestLookupLocalhostIPSuccessTestLookupLocalhostIPSuc…TestCreateKeyspaceError · introduced test · go.temporal.io/server/tools/cassandra/TestHandlerTestSuite/TestCreateKeyspaceErrorTestCreateKeyspaceErrorTestDropKeyspaceError · introduced test · go.temporal.io/server/tools/cassandra/TestHandlerTestSuite/TestDropKeyspaceErrorTestDropKeyspaceErrorTestCreateKeyspace · introduced test · go.temporal.io/server/tools/tests/TestSetupCQLSchemaTestSuite/TestCreateKeyspaceTestCreateKeyspaceTestSetupSchema · introduced test · go.temporal.io/server/tools/tests/TestSetupCQLSchemaTestSuite/TestSetupSchemaTestSetupSchemaTestDryrun · introduced test · go.temporal.io/server/tools/tests/TestUpdateCQLSchemaTestSuite/TestDryrunTestDryrunTestUpdateSchema · introduced test · go.temporal.io/server/tools/tests/TestUpdateCQLSchemaTestSuite/TestUpdateSchemaTestUpdateSchemaTestVerifyCompatibleVersion · introduced test · go.temporal.io/server/tools/tests/TestVersionTestSuite/TestVerifyCompatibleVersionTestVerifyCompatibleVers…Focused concept · handler.go ×4 · 170 introduced LOChandler.go ×4

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

2 files ranked by introduced lines: 170 introduced LOC across 7 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/tools/cassandra/main.go 145 introduced LOC · 3 ranges

Open complete file

22
23 // root handler for all cli commands
24 > func cliHandler(c *cli.Context, handler func(c *cli.Context, logger log.Logger) error, logger log.Logger) { main.go
25 > quiet := c.GlobalBool(schema.CLIOptQuiet)
26 > err := handler(c, logger)
27 > if err != nil && !quiet {
28 osExit(1)
29 }
30 }
31
32 > func buildCLIOptions() *cli.App { main.go
33 >
34 > app := cli.NewApp()
35 > app.Name = "temporal-cassandra-tool"
36 > app.Usage = "Command line tool for temporal cassandra operations"
37 > app.Version = headers.ServerVersion
38 > logger := log.NewCLILogger()
39 >
40 > app.Flags = []cli.Flag{
41 > cli.StringFlag{
42 > Name: schema.CLIFlagEndpoint,
43 > Value: environment.GetCassandraAddress(),
44 > Usage: "hostname or ip address of cassandra host to connect to",
45 > EnvVar: "CASSANDRA_HOST",
46 > },
47 > cli.IntFlag{
48 > Name: schema.CLIFlagPort,
49 > Value: environment.GetCassandraPort(),
50 > Usage: "Port of cassandra host to connect to",
51 > EnvVar: "CASSANDRA_PORT",
52 > },
53 > cli.StringFlag{
54 > Name: schema.CLIFlagUser,
55 > Value: "",
56 > Usage: "User name used for authentication for connecting to cassandra host",
57 > EnvVar: "CASSANDRA_USER",
58 > },
59 > cli.StringFlag{
60 > Name: schema.CLIFlagPassword,
61 > Value: "",
62 > Usage: "Password used for authentication for connecting to cassandra host",
63 > EnvVar: "CASSANDRA_PASSWORD",
64 > },
65 > cli.StringSliceFlag{
66 > Name: schema.CLIFlagAllowedAuthenticators,
67 > Value: nil,
68 > Usage: "List of authenticators allowed to be used by the gocql client while connecting to the server.",
69 > EnvVar: "CASSANDRA_ALLOWED_AUTHENTICATORS",
70 > },
71 > cli.IntFlag{
72 > Name: schema.CLIFlagTimeout,
73 > Value: defaultTimeout,
74 > Usage: "request Timeout in seconds used for cql client",
75 > EnvVar: "CASSANDRA_TIMEOUT",
76 > },
77 > cli.StringFlag{
78 > Name: schema.CLIFlagKeyspace,
79 > Value: "temporal",
80 > Usage: "name of the cassandra Keyspace",
81 > EnvVar: "CASSANDRA_KEYSPACE",
82 > },
83 > cli.StringFlag{
84 > Name: schema.CLIFlagDatacenter,
85 > Value: "",
86 > Usage: "enable NetworkTopologyStrategy by providing datacenter name",
87 > EnvVar: "CASSANDRA_DATACENTER",
88 > },
89 > cli.StringFlag{
90 > Name: schema.CLIOptAddressTranslator,
91 > Value: "",
92 > Usage: "name of address translator for cassandra hosts",
93 > EnvVar: "CASSANDRA_ADDRESS_TRANSLATOR",
94 > },
95 > cli.StringFlag{
96 > Name: schema.CLIOptAddressTranslatorOptions,
97 > Value: "",
98 > Usage: "colon-separated list of key=value pairs as options for address translator",
99 > EnvVar: "CASSANDRA_ADDRESS_TRANSLATOR_OPTIONS_CLI",
100 > },
101 > cli.BoolFlag{
102 > Name: schema.CLIFlagQuiet,
103 > Usage: "Don't set exit status to 1 on error",
104 > },
105 > cli.BoolFlag{
106 > Name: schema.CLIFlagDisableInitialHostLookup,
107 > Usage: "instructs gocql driver to only connect to the supplied hosts vs. attempting to lookup additional hosts via the system.peers table",
108 > EnvVar: "CASSANDRA_DISABLE_INITIAL_HOST_LOOKUP",
109 > },
110 > cli.BoolFlag{
111 > Name: schema.CLIFlagEnableTLS,
112 > Usage: "enable TLS",
113 > EnvVar: "CASSANDRA_ENABLE_TLS",
114 > },
115 > cli.StringFlag{
116 > Name: schema.CLIFlagTLSCertFile,
117 > Usage: "TLS cert file",
118 > EnvVar: "CASSANDRA_TLS_CERT",
119 > },
120 > cli.StringFlag{
121 > Name: schema.CLIFlagTLSKeyFile,
122 > Usage: "TLS key file",
123 > EnvVar: "CASSANDRA_TLS_KEY",
124 > },
125 > cli.StringFlag{
126 > Name: schema.CLIFlagTLSCaFile,
127 > Usage: "TLS CA file",
128 > EnvVar: "CASSANDRA_TLS_CA",
129 > },
130 > cli.StringFlag{
131 > Name: schema.CLIFlagTLSHostName,
132 > Value: "",
133 > Usage: "override for target server name",
134 > EnvVar: "CASSANDRA_TLS_SERVER_NAME",
135 > },
136 > cli.BoolFlag{
137 > Name: schema.CLIFlagTLSDisableHostVerification,
138 > Usage: "disable tls host name verification (tls must be enabled)",
139 > EnvVar: "CASSANDRA_TLS_DISABLE_HOST_VERIFICATION",
140 > },
141 > }
142 >
143 > app.Commands = []cli.Command{
144 > {
145 > Name: "setup-schema",
146 > Aliases: []string{"setup"},
147 > Usage: "setup initial version of cassandra schema",
148 > Flags: []cli.Flag{
149 > cli.StringFlag{
150 > Name: schema.CLIFlagVersion,
151 > Usage: "initial version of the schema, cannot be used with disable-versioning",
152 > },
153 > cli.StringFlag{
154 > Name: schema.CLIFlagSchemaFile,
155 > Usage: "path to the .cql schema file; if un-specified, will just setup versioning tables",
156 > },
157 > cli.StringFlag{
158 > Name: schema.CLIFlagSchemaName,
159 > Usage: fmt.Sprintf("name of embedded schema directory with .cql file, one of: %v",
160 > dbschemas.PathsByDB("cassandra")),
161 > },
162 > cli.BoolFlag{
163 > Name: schema.CLIFlagDisableVersioning,
164 > Usage: "disable setup of schema versioning",
165 > },
166 > cli.BoolFlag{
167 > Name: schema.CLIFlagOverwrite,
168 > Usage: "drop all existing tables before setting up new schema",
169 > },
170 > },
171 > Action: func(c *cli.Context) {
172 cliHandler(c, setupSchema, logger)
173 },
270 }
271
272 > return app main.go
273 }
go.temporal.io/server/tools/cassandra/handler.go 25 introduced LOC · 4 ranges

Open complete file

144 }
145
146 > func newCQLClientConfig(cli *cli.Context) (*CQLClientConfig, error) { handler.go
147 > config := &CQLClientConfig{
148 > Hosts: cli.GlobalString(schema.CLIOptEndpoint),
149 > Port: cli.GlobalInt(schema.CLIOptPort),
150 > User: cli.GlobalString(schema.CLIOptUser),
151 > Password: cli.GlobalString(schema.CLIOptPassword),
152 > AllowedAuthenticators: cli.GlobalStringSlice(schema.CLIOptAllowedAuthenticators),
153 > Timeout: cli.GlobalInt(schema.CLIOptTimeout),
154 > Keyspace: cli.GlobalString(schema.CLIOptKeyspace),
155 > numReplicas: cli.Int(schema.CLIOptReplicationFactor),
156 > Datacenter: cli.String(schema.CLIOptDatacenter),
157 > Consistency: cli.String(schema.CLIOptConsistency),
158 > DisableInitialHostLookup: cli.GlobalBool(schema.CLIFlagDisableInitialHostLookup),
159 > }
160 >
161 > if cli.GlobalBool(schema.CLIFlagEnableTLS) {
162 config.TLS = &auth.TLS{
163 Enabled: true,
170 }
171
172 > config.AddressTranslator = &c.CassandraAddressTranslator{ handler.go
173 > Translator: cli.GlobalString(schema.CLIOptAddressTranslator),
174 > Options: parseOptionsMap(cli.GlobalString(schema.CLIOptAddressTranslatorOptions)),
175 > }
176 >
177 > if err := validateCQLClientConfig(config); err != nil {
178 return nil, err
179 }
180 > return config, nil handler.go
181 }
182
183 func parseOptionsMap(value string) map[string]string {
184 if len(value) == 0 {
185 > return make(map[string]string) handler.go
186 > }
187
188 parsedMap := make(map[string]string)