syncman

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2019 License: Apache-2.0 Imports: 21 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager added in v0.13.0

type Manager struct {
	// contains filtered or unexported fields
}

Manager syncs the project config between folders

func New

func New(nodeID, clusterID string, isConsulEnabled bool) (*Manager, error)

New creates a new instance of the sync manager

func (*Manager) CreateProjectConfig added in v0.13.0

func (s *Manager) CreateProjectConfig(project *config.Project) (error, int)

func (*Manager) DeleteProjectConfig added in v0.13.0

func (s *Manager) DeleteProjectConfig(projectID string) error

DeleteProjectConfig applies delete project config command to the raft log

func (*Manager) GetAssignedSpaceCloudURL added in v0.13.0

func (s *Manager) GetAssignedSpaceCloudURL(ctx context.Context, project string, token int) (string, error)

GetAssignedSpaceCloudURL returns the space cloud url assigned for the provided token

func (*Manager) GetAssignedTokens added in v0.13.0

func (s *Manager) GetAssignedTokens() (start, end int)

GetAssignedTokens returns the array or tokens assigned to this node

func (*Manager) GetClusterSize added in v0.13.0

func (s *Manager) GetClusterSize(ctxParent context.Context) (int, error)

GetClusterSize returns the size of the cluster

func (*Manager) GetConfig added in v0.13.0

func (s *Manager) GetConfig(projectID string) (*config.Project, error)

GetConfig returns the config present in the state

func (*Manager) GetEventSource added in v0.13.0

func (s *Manager) GetEventSource() string

GetEventSource returns the source id for the space cloud instance

func (*Manager) GetGlobalConfig added in v0.13.0

func (s *Manager) GetGlobalConfig() *config.Config

GetGlobalConfig gets the global config

func (*Manager) GetSpaceCloudNodeURLs added in v0.13.0

func (s *Manager) GetSpaceCloudNodeURLs(project string) []string

GetSpaceCloudNodeURLs returns the array of space cloud urls

func (*Manager) MakeHTTPRequest added in v0.13.0

func (s *Manager) MakeHTTPRequest(ctx context.Context, method, url, token string, params, vPtr interface{}) error

MakeHTTPRequest fires an http request and returns a response

func (*Manager) SetCollectionRules added in v0.13.0

func (s *Manager) SetCollectionRules(project, dbType, col string, v *config.TableRule) error

func (*Manager) SetDatabaseConnection added in v0.13.0

func (s *Manager) SetDatabaseConnection(project, dbType string, connection string, enabled bool) error

func (*Manager) SetDeleteCollection added in v0.13.0

func (s *Manager) SetDeleteCollection(project, dbType, col string) error

func (*Manager) SetDeleteEventingRule added in v0.13.0

func (s *Manager) SetDeleteEventingRule(project, ruleName string) error

func (*Manager) SetDeleteFileRule added in v0.13.0

func (s *Manager) SetDeleteFileRule(project, filename string) error

func (*Manager) SetDeleteService added in v0.13.0

func (s *Manager) SetDeleteService(project, service string) error

func (*Manager) SetEventingConfig added in v0.13.0

func (s *Manager) SetEventingConfig(project, dbType, col string, enabled bool) error

func (*Manager) SetEventingRule added in v0.13.0

func (s *Manager) SetEventingRule(project, ruleName string, value config.EventingRule) error

func (*Manager) SetFileRule added in v0.13.0

func (s *Manager) SetFileRule(project string, value *config.FileRule) error

func (*Manager) SetFileStore added in v0.13.0

func (s *Manager) SetFileStore(project string, value *config.FileStore) error

func (*Manager) SetGlobalConfig added in v0.13.0

func (s *Manager) SetGlobalConfig(c *config.Config)

SetGlobalConfig sets the global config. This must be called before the Start command.

func (*Manager) SetModifyAllSchema added in v0.13.0

func (s *Manager) SetModifyAllSchema(ctx context.Context, dbType, project string, schemaArg *schema.Schema, v config.CrudStub) error

func (*Manager) SetModifySchema added in v0.13.0

func (s *Manager) SetModifySchema(project, dbType, col, schema string) error

func (*Manager) SetProjectConfig added in v0.13.0

func (s *Manager) SetProjectConfig(project *config.Project) error

SetProjectConfig applies the set project config command to the raft log

func (*Manager) SetProjectGlobalConfig added in v0.13.0

func (s *Manager) SetProjectGlobalConfig(project *config.Project) error

SetProjectGlobalConfig applies the set project config command to the raft log

func (*Manager) SetReloadSchema added in v0.13.0

func (s *Manager) SetReloadSchema(ctx context.Context, dbType, project string, schemaArg *schema.Schema) (map[string]interface{}, error)

func (*Manager) SetSchemaInspection added in v0.13.0

func (s *Manager) SetSchemaInspection(project, dbType, col, schema string) error

func (*Manager) SetService added in v0.13.0

func (s *Manager) SetService(project, service string, value *config.Service) error

func (*Manager) SetUserManagement added in v0.13.0

func (s *Manager) SetUserManagement(project, provider string, value *config.AuthStub) error

func (*Manager) Start added in v0.13.0

func (s *Manager) Start(configFilePath string, cb func(*config.Config) error) error

Start begins the sync manager operations

Jump to

Keyboard shortcuts

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