Documentation ¶
Index ¶
- Variables
- func ParseTablets(rows *sql.Rows, c *cluster.Cluster) ([]*vtadminpb.Tablet, error)
- type API
- func (api *API) GetGates(ctx context.Context, req *vtadminpb.GetGatesRequest) (*vtadminpb.GetGatesResponse, error)
- func (api *API) GetTablet(ctx context.Context, req *vtadminpb.GetTabletRequest) (*vtadminpb.Tablet, error)
- func (api *API) GetTablets(ctx context.Context, req *vtadminpb.GetTabletsRequest) (*vtadminpb.GetTabletsResponse, error)
- func (api *API) ListenAndServe() error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrAmbiguousTablet occurs when more than one tablet is found for a given // set of filter criteria. ErrAmbiguousTablet = errors.New("multiple tablets found") // ErrNoTablet occurs when a tablet cannot be found for a given set of // filter criteria. ErrNoTablet = errors.New("no such tablet") // ErrUnsupportedCluster occurs when a cluster parameter is invalid. ErrUnsupportedCluster = errors.New("unsupported cluster(s)") )
Functions ¶
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API is the main entrypoint for the vtadmin server. It implements vtadminpb.VTAdminServer.
func NewAPI ¶
func NewAPI(clusters []*cluster.Cluster, opts grpcserver.Options, httpOpts vtadminhttp.Options) *API
NewAPI returns a new API, configured to service the given set of clusters, and configured with the given gRPC and HTTP server options.
func (*API) GetGates ¶
func (api *API) GetGates(ctx context.Context, req *vtadminpb.GetGatesRequest) (*vtadminpb.GetGatesResponse, error)
GetGates is part of the vtadminpb.VTAdminServer interface.
func (*API) GetTablet ¶
func (api *API) GetTablet(ctx context.Context, req *vtadminpb.GetTabletRequest) (*vtadminpb.Tablet, error)
GetTablet is part of the vtadminpb.VTAdminServer interface.
func (*API) GetTablets ¶
func (api *API) GetTablets(ctx context.Context, req *vtadminpb.GetTabletsRequest) (*vtadminpb.GetTabletsResponse, error)
GetTablets is part of the vtadminpb.VTAdminServer interface.
func (*API) ListenAndServe ¶
ListenAndServe starts serving this API on the configured Addr (see grpcserver.Options) until shutdown or irrecoverable error occurs.
Directories ¶
Path | Synopsis |
---|---|
discovery/fakediscovery
Package fakediscovery provides a fake, in-memory discovery implementation.
|
Package fakediscovery provides a fake, in-memory discovery implementation. |
Package sort provides convenience wrappers for sorting various vtadmin types.
|
Package sort provides convenience wrappers for sorting various vtadmin types. |
Package vtadminproto provides helper functions for working with vtadminpb protobuf types.
|
Package vtadminproto provides helper functions for working with vtadminpb protobuf types. |
fakevtsql
Package fakevtsql provides an interface for mocking out sql.DB responses in tests that depend on a vtsql.DB instance.
|
Package fakevtsql provides an interface for mocking out sql.DB responses in tests that depend on a vtsql.DB instance. |
Click to show internal directories.
Click to hide internal directories.