go.temporal.io/server/schema/embed.go

66 LOC · 30 covered · 36 uncovered · 13 ranges · 79 concepts · 7 introducers · 34 tests

File neighbourhood

The centred file is linked to every concept that introduces one of its ranges, every test that runs code from the file, and the gray connector concepts standing between those tests and the file's own introducer concepts. Undirected links join concepts to every file where they introduce source and concepts to the tests they introduce; arrows show specialization between the displayed concepts and bridge only concepts omitted from this view. Concept colors match the source ranges below; connector concepts have no source color and are shown in gray.

Focused file, its introducer and connector concepts, their introduced files, and tests that run code from the file

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 related-file, concept, and source links on this page.

Focused file, its introducer and connector concepts, their introduced files, and tests that run code from the filego.temporal.io/server/common/persistence/visibility/store/elasticsearch/client/client_v7.go · 451 LOCclient/client_v7.gogo.temporal.io/server/common/persistence/visibility/store/elasticsearch/client/logger.go · 33 LOCclient/logger.gogo.temporal.io/server/tools/elasticsearch/handler.go · 242 LOCelasticsearch/handler.gogo.temporal.io/server/tools/elasticsearch/main.go · 213 LOCelasticsearch/main.gogo.temporal.io/server/tools/elasticsearch/tasks.go · 210 LOCelasticsearch/tasks.goTestVisibilityDryrun · 0 introduced LOCTestVisibilityDryrunTestVisibilityDryrun · 0 introduced LOCTestVisibilityDryrunquery_util.go ×3 · 6 introduced LOCquery_util.go ×3TestUpdateSchema · 0 introduced LOCTestUpdateSchemaTestUpdateSchema · 0 introduced LOCTestUpdateSchemaTestUpdateSchema · 0 introduced LOCTestUpdateSchemaTestDryrun · 0 introduced LOCTestDryrunTestVisibilityDryrun · 0 introduced LOCTestVisibilityDryrunupdate_task_tests.go ×1 · 6 introduced LOCupdate_task_tests.go ×1cqlclient.go ×4 · 17 introduced LOCcqlclient.go ×4TestDryrun · 0 introduced LOCTestDryrunTestDryrun · 0 introduced LOCTestDryrunhandler.go ×4 · 18 introduced LOChandler.go ×4TestVerifyCompatibleVersion · 0 introduced LOCTestVerifyCompatibleVers…update_task_tests.go ×1 · 6 introduced LOCupdate_task_tests.go ×1TestVerifyCompatibleVersion · 0 introduced LOCTestVerifyCompatibleVers…db.go ×2 · 6 introduced LOCdb.go ×2update_task_tests.go ×1 · 8 introduced LOCupdate_task_tests.go ×1TestSetupSchema · 0 introduced LOCTestSetupSchemaupdate_task_tests.go ×1 · 8 introduced LOCupdate_task_tests.go ×1TestSetupSchema · 0 introduced LOCTestSetupSchemaupdate_task_tests.go ×4 · 37 introduced LOCupdate_task_tests.go ×4TestSetupSchema · 0 introduced LOCTestSetupSchemadb.go ×2 · 6 introduced LOCdb.go ×2handler.go ×1 · 8 introduced LOChandler.go ×1schema_version_reader.go ×4 · 77 introduced LOCschema_version_reader.go…setuptest.go ×1 · 11 introduced LOCsetuptest.go ×1version_tests.go ×4 · 78 introduced LOCversion_tests.go ×4handler.go ×4 · 12 introduced LOChandler.go ×4updatetest.go ×3 · 74 introduced LOCupdatetest.go ×3dbtest.go ×4 · 8 introduced LOCdbtest.go ×4updatetest.go ×1 · 23 introduced LOCupdatetest.go ×1updatetask.go ×34 · 135 introduced LOCupdatetask.go ×34handler.go ×4 · 13 introduced LOChandler.go ×4pgx.go ×1 · 4 introduced LOCpgx.go ×1pq.go ×1 · 4 introduced LOCpq.go ×1TestCreateDatabase · 0 introduced LOCTestCreateDatabaseTestCreateDatabase · 0 introduced LOCTestCreateDatabaseTestCreateDatabaseIdempotent · 0 introduced LOCTestCreateDatabaseIdempo…admin.go ×1 · 6 introduced LOCadmin.go ×1TestCreateDatabase · 0 introduced LOCTestCreateDatabasehandler.go ×4 · 14 introduced LOChandler.go ×4setup_task_tests.go ×3 · 9 introduced LOCsetup_task_tests.go ×3setuptest.go ×4 · 84 introduced LOCsetuptest.go ×4main.go ×1 · 4 introduced LOCmain.go ×1setup_task_tests.go ×1 · 16 introduced LOCsetup_task_tests.go ×1setup_task_tests.go ×1 · 29 introduced LOCsetup_task_tests.go ×1handler.go ×5 · 17 introduced LOChandler.go ×5version.go ×3 · 9 introduced LOCversion.go ×3setuptest.go ×1 · 10 introduced LOCsetuptest.go ×1setup_task_tests.go ×4 · 21 introduced LOCsetup_task_tests.go ×4dbtest.go ×5 · 7 introduced LOCdbtest.go ×5main.go ×1 · 4 introduced LOCmain.go ×1handler.go ×4 · 141 introduced LOChandler.go ×4setuptask.go ×8 · 18 introduced LOCsetuptask.go ×8setuptask.go ×11 · 50 introduced LOCsetuptask.go ×11setuptest.go ×3 · 14 introduced LOCsetuptest.go ×3handler.go ×4 · 61 introduced LOChandler.go ×4handler.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 ×2handler.go ×4 · 170 introduced LOChandler.go ×4types.go ×1 · 3 introduced LOCtypes.go ×1handler.go ×4 · 12 introduced LOChandler.go ×4handler.go ×3 · 9 introduced LOChandler.go ×3TestReadSchemaDirEFS · 0 introduced LOCTestReadSchemaDirEFShandler.go ×1 · 3 introduced LOChandler.go ×1embed.go ×1 · 1 introduced LOCembed.go ×1handler.go ×2 · 3 introduced LOChandler.go ×2handler.go ×7 · 11 introduced LOChandler.go ×7handler.go ×5 · 6 introduced LOChandler.go ×5mock_db.go ×1 · 3 introduced LOCmock_db.go ×1handler.go ×1 · 3 introduced LOChandler.go ×1embed.go ×1 · 2 introduced LOCembed.go ×1embed.go ×1 · 2 introduced LOCembed.go ×1embed.go ×5 · 14 introduced LOCembed.go ×5embed.go ×1 · 3 introduced LOCembed.go ×1embed.go ×2 · 4 introduced LOCembed.go ×2TestElasticsearchIndexTemplateIsLatest · introduced test · go.temporal.io/server/schema/TestElasticsearchIndexTemplateIsLatestTestElasticsearchIndexTe…TestSchemaDirs · introduced test · go.temporal.io/server/schema/TestSchemaDirsTestSchemaDirsTestCreateKeyspaceError · introduced test · go.temporal.io/server/tools/cassandra/TestHandlerTestSuite/TestCreateKeyspaceErrorTestCreateKeyspaceErrorTestDropKeyspaceError · introduced test · go.temporal.io/server/tools/cassandra/TestHandlerTestSuite/TestDropKeyspaceErrorTestDropKeyspaceErrorTestValidateSetupConfig · introduced test · go.temporal.io/server/tools/common/schema/TestHandlerTestSuite/TestValidateSetupConfigTestValidateSetupConfigTestValidateUpdateConfig · introduced test · go.temporal.io/server/tools/common/schema/TestHandlerTestSuite/TestValidateUpdateConfigTestValidateUpdateConfigTestReadSchemaDirEFS · introduced test · go.temporal.io/server/tools/common/schema/TestUpdateTaskTestSuite/TestReadSchemaDirEFSTestReadSchemaDirEFSTestSetupSchemaError · introduced test · go.temporal.io/server/tools/elasticsearch/TestMainTestSuite/TestSetupSchemaErrorTestSetupSchemaErrorTestCreateDatabase · introduced test · go.temporal.io/server/tools/tests/TestMySQLSetupSchemaTestSuite/TestCreateDatabaseTestCreateDatabaseTestCreateDatabaseIdempotent · introduced test · go.temporal.io/server/tools/tests/TestMySQLSetupSchemaTestSuite/TestCreateDatabaseIdempotentTestCreateDatabaseIdempo…TestSetupSchema · introduced test · go.temporal.io/server/tools/tests/TestMySQLSetupSchemaTestSuite/TestSetupSchemaTestSetupSchemaTestDryrun · introduced test · go.temporal.io/server/tools/tests/TestMySQLUpdateSchemaTestSuite/TestDryrunTestDryrunTestUpdateSchema · introduced test · go.temporal.io/server/tools/tests/TestMySQLUpdateSchemaTestSuite/TestUpdateSchemaTestUpdateSchemaTestVisibilityDryrun · introduced test · go.temporal.io/server/tools/tests/TestMySQLUpdateSchemaTestSuite/TestVisibilityDryrunTestVisibilityDryrunTestVerifyCompatibleVersion · introduced test · go.temporal.io/server/tools/tests/TestMySQLVersionTestSuite/TestVerifyCompatibleVersionTestVerifyCompatibleVers…TestCreateDatabase · introduced test · go.temporal.io/server/tools/tests/TestPostgres/TestPostgreSQLSetupSchemaTestSuite/TestCreateDatabaseTestCreateDatabaseTestCreateDatabaseIdempotent · introduced test · go.temporal.io/server/tools/tests/TestPostgres/TestPostgreSQLSetupSchemaTestSuite/TestCreateDatabaseIdempotentTestCreateDatabaseIdempo…TestSetupSchema · introduced test · go.temporal.io/server/tools/tests/TestPostgres/TestPostgreSQLSetupSchemaTestSuite/TestSetupSchemaTestSetupSchemaTestDryrun · introduced test · go.temporal.io/server/tools/tests/TestPostgres/TestPostgreSQLUpdateSchemaTestSuite/TestDryrunTestDryrunTestUpdateSchema · introduced test · go.temporal.io/server/tools/tests/TestPostgres/TestPostgreSQLUpdateSchemaTestSuite/TestUpdateSchemaTestUpdateSchemaTestVisibilityDryrun · introduced test · go.temporal.io/server/tools/tests/TestPostgres/TestPostgreSQLUpdateSchemaTestSuite/TestVisibilityDryrunTestVisibilityDryrunTestVerifyCompatibleVersion · introduced test · go.temporal.io/server/tools/tests/TestPostgres/TestPostgreSQLVersionTestSuite/TestVerifyCompatibleVersionTestVerifyCompatibleVers…TestCreateDatabase · introduced test · go.temporal.io/server/tools/tests/TestPostgresPGX/TestPostgreSQLSetupSchemaTestSuite/TestCreateDatabaseTestCreateDatabaseTestCreateDatabaseIdempotent · introduced test · go.temporal.io/server/tools/tests/TestPostgresPGX/TestPostgreSQLSetupSchemaTestSuite/TestCreateDatabaseIdempotentTestCreateDatabaseIdempo…TestSetupSchema · introduced test · go.temporal.io/server/tools/tests/TestPostgresPGX/TestPostgreSQLSetupSchemaTestSuite/TestSetupSchemaTestSetupSchemaTestDryrun · introduced test · go.temporal.io/server/tools/tests/TestPostgresPGX/TestPostgreSQLUpdateSchemaTestSuite/TestDryrunTestDryrunTestUpdateSchema · introduced test · go.temporal.io/server/tools/tests/TestPostgresPGX/TestPostgreSQLUpdateSchemaTestSuite/TestUpdateSchemaTestUpdateSchemaTestVisibilityDryrun · introduced test · go.temporal.io/server/tools/tests/TestPostgresPGX/TestPostgreSQLUpdateSchemaTestSuite/TestVisibilityDryrunTestVisibilityDryrunTestVerifyCompatibleVersion · introduced test · go.temporal.io/server/tools/tests/TestPostgresPGX/TestPostgreSQLVersionTestSuite/TestVerifyCompatibleVersionTestVerifyCompatibleVers…TestCreateKeyspace · 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 file · go.temporal.io/server/schema/embed.go · 66 LOCschema/embed.go

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the related-file, concept, and source links on this page while the interactive map is unavailable.

1 package schema
2
3 import (
4 "embed"
5 "io/fs"
6 "path/filepath"
7
8 "go.temporal.io/server/common/log"
9 "go.temporal.io/server/common/log/tag"
10 )
11
12 //go:embed *
13 var assets embed.FS
14
15 // Assets returns a file system with the contents of the schema directory
16 > func Assets() fs.FS { embed.go ×1
17 > return assets
18 > }
19
20 // PathsByDir returns a list of paths to directories within the schema subdirectory that have versioned schemas in them
21 > func PathsByDir(dbSubDir string) []string { embed.go ×5
22 > logger := log.NewCLILogger()
23 > efs := Assets()
24 > dirs := make([]string, 0)
25 > err := fs.WalkDir(efs, dbSubDir, func(path string, d fs.DirEntry, err error) error {
26 > if err != nil {
27 return err
28 }
29 > if d.IsDir() { embed.go ×5
30 > if d.Name() == "versioned" {
31 > dirs = append(dirs, filepath.ToSlash(filepath.Dir(path)))
32 > return fs.SkipDir
33 > }
34 }
35 > return nil embed.go ×5
36 })
37 > if err != nil { embed.go ×5
38 logger.Error("error walking embedded schema file system tree, could not generate valid paths", tag.Error(err))
39 }
40 > return dirs embed.go ×5
41 }
42
43 > func PathsByDB(dbName string) []string { embed.go ×1
44 > if dbName == "sql" {
45 > return append(PathsByDir("mysql"), PathsByDir("postgresql")...) embed.go ×1
46 > }
47 > return PathsByDir(dbName) embed.go ×1
48 }
49
50 // ElasticsearchClusterSettings returns the embedded cluster settings for Elasticsearch v7
51 > func ElasticsearchClusterSettings() (string, error) { handler.go ×4
52 > data, err := assets.ReadFile("elasticsearch/visibility/cluster_settings_v7.json")
53 > if err != nil {
54 return "", err
55 }
56 > return string(data), nil handler.go ×4
57 }
58
59 // ElasticsearchIndexTemplate returns the embedded index template for Elasticsearch v7 (latest version)
60 > func ElasticsearchIndexTemplate() (string, error) { embed.go ×2
61 > data, err := assets.ReadFile("elasticsearch/visibility/versioned/v14/index_template_v7.json")
62 > if err != nil {
63 return "", err
64 }
65 > return string(data), nil embed.go ×2
66 }