syncman

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

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

func (*Manager) DeleteProjectConfig

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

DeleteProjectConfig applies delete project config command to the raft log

func (*Manager) GetAssignedSpaceCloudURL

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

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

GetAssignedTokens returns the array or tokens assigned to this node

func (*Manager) GetClusterSize

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

GetClusterSize returns the size of the cluster

func (*Manager) GetConfig

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

GetConfig returns the config present in the state

func (*Manager) GetEventSource

func (s *Manager) GetEventSource() string

GetEventSource returns the source id for the space cloud instance

func (*Manager) GetGlobalConfig

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

GetGlobalConfig gets the global config

func (*Manager) GetSpaceCloudNodeURLs

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

GetSpaceCloudNodeURLs returns the array of space cloud urls

func (*Manager) MakeHTTPRequest

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

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

func (*Manager) SetDatabaseConnection

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

func (*Manager) SetDeleteCollection

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

func (*Manager) SetDeleteEventingRule

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

func (*Manager) SetDeleteFileRule

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

func (*Manager) SetDeleteService

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

func (*Manager) SetEventingConfig

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

func (*Manager) SetEventingRule

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

func (*Manager) SetFileRule

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

func (*Manager) SetFileStore

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

func (*Manager) SetGlobalConfig

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

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

func (*Manager) SetModifyAllSchema

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

func (*Manager) SetModifySchema

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

func (*Manager) SetProjectConfig

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

SetProjectConfig applies the set project config command to the raft log

func (*Manager) SetProjectGlobalConfig

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

SetProjectGlobalConfig applies the set project config command to the raft log

func (*Manager) SetReloadSchema

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

func (*Manager) SetSchemaInspection

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

func (*Manager) SetService

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

func (*Manager) SetUserManagement

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

func (*Manager) Start

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