forked from vitessio/vitess
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
36 lines (28 loc) · 821 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright 2015 Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package main is the implementation of vtgateclienttest.
// This program has a chain of vtgateservice.VTGateService implementations,
// each one being responsible for one test scenario.
package main
import (
"flag"
"github.com/youtube/vitess/go/cmd/vtgateclienttest/services"
"github.com/youtube/vitess/go/exit"
"github.com/youtube/vitess/go/vt/servenv"
"github.com/youtube/vitess/go/vt/vtgate"
)
func init() {
servenv.RegisterDefaultFlags()
}
func main() {
defer exit.Recover()
flag.Parse()
servenv.Init()
// The implementation chain.
s := services.CreateServices()
for _, f := range vtgate.RegisterVTGates {
f(s)
}
servenv.RunDefault()
}