Skip to content

Commit

Permalink
Merge branch 'thirdparty-setup' into main-2025-q1
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Johnson committed Jan 15, 2025
2 parents 8e905aa + e4dd461 commit 98ee5ee
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,6 @@ report
# mise files
.mise.toml
/errors/

# thirdparty
/go/thirdparty/
3 changes: 3 additions & 0 deletions go/cmd/vtgate/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"vitess.io/vitess/go/acl"
"vitess.io/vitess/go/exit"
"vitess.io/vitess/go/stats"
"vitess.io/vitess/go/thirdparty"
"vitess.io/vitess/go/vt/discovery"
"vitess.io/vitess/go/vt/servenv"
"vitess.io/vitess/go/vt/srvtopo"
Expand Down Expand Up @@ -80,6 +81,8 @@ var (

func init() {
srvTopoCounts = stats.NewCountersWithSingleLabel("ResilientSrvTopoServer", "Resilient srvtopo server operations", "type")
// Initalize any third party implementations for vitess
thirdparty.InitializeThirdParty()
}

// CheckCellFlags will check validation of cell and cells_to_watch flag
Expand Down
15 changes: 15 additions & 0 deletions go/thirdparty/thirdparty.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package thirdparty

import (
"sync"
)

var once sync.Once

func InitializeThirdParty() {
// only initialize once
once.Do(func() {
// initialize/register any third part implemenations

})
}

0 comments on commit 98ee5ee

Please sign in to comment.