domain

package
v0.0.0-...-40faf7d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrLoadSchemaTimeOut returns for loading schema time out.
	ErrLoadSchemaTimeOut = terror.ClassDomain.New(codeLoadSchemaTimeOut, "reload schema timeout")
)

Functions

This section is empty.

Types

type Domain

type Domain struct {
	SchemaValidity *schemaValidityInfo
	// contains filtered or unexported fields
}

Domain represents a storage space. Different domains can use the same database name. Multiple domains can be used in parallel without synchronization.

func NewDomain

func NewDomain(store kv.Storage, lease time.Duration) (d *Domain, err error)

NewDomain creates a new domain. Should not create multiple domains for the same store.

func (*Domain) DDL

func (do *Domain) DDL() ddl.DDL

DDL gets DDL from domain.

func (*Domain) GetScope

func (do *Domain) GetScope(status string) variable.ScopeFlag

GetScope gets the status variables scope.

func (*Domain) GetSnapshotInfoSchema

func (do *Domain) GetSnapshotInfoSchema(snapshotTS uint64) (infoschema.InfoSchema, error)

GetSnapshotInfoSchema gets a snapshot information schema.

func (*Domain) InfoSchema

func (do *Domain) InfoSchema() infoschema.InfoSchema

InfoSchema gets information schema from domain.

func (*Domain) PerfSchema

func (do *Domain) PerfSchema() perfschema.PerfSchema

PerfSchema gets performance schema from domain.

func (*Domain) Reload

func (do *Domain) Reload() error

Reload reloads InfoSchema. It's public in order to do the test.

func (*Domain) SetLease

func (do *Domain) SetLease(lease time.Duration)

SetLease will reset the lease time for online DDL change.

func (*Domain) Stats

func (do *Domain) Stats() (map[string]interface{}, error)

Stats returns the domain statistic.

func (*Domain) Store

func (do *Domain) Store() kv.Storage

Store gets KV store from domain.

type MockFailure

type MockFailure struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

MockFailure mocks reload failed. It's used for fixing data race in tests.

func (*MockFailure) SetValue

func (m *MockFailure) SetValue(isFailed bool)

SetValue sets whether we need to mock reload failed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL