v2

package
v0.0.0-...-0490640 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMessageBoxFull = errors.New("Message box full")

Functions

func NewAuthzServer

NewAuthzServer returns a new IAM v2 Authz server.

func NewMemstoreProjectsServer

func NewMemstoreProjectsServer(
	ctx context.Context,
	l logger.Logger,
	e engine.ProjectRulesRetriever,
	eventServiceClient automate_event.EventServiceClient,
	configManager *config.Manager,
) (api.ProjectsServer, error)

NewMemstoreProjectsServer returns an instance of api.ProjectsServer

func NewPostgresProjectsServer

func NewPostgresProjectsServer(
	ctx context.Context,
	l logger.Logger,
	migrationsConfig migration.Config,
	dataMigrationsConfig datamigration.Config,
	e engine.ProjectRulesRetriever,
	eventServiceClient automate_event.EventServiceClient,
	configManager *config.Manager,
) (api.ProjectsServer, error)

NewPostgresProjectsServer instantiates a ProjectsServer using a PG store

func NewProjectsServer

func NewProjectsServer(
	ctx context.Context,
	l logger.Logger,
	s storage.Storage,
	e engine.ProjectRulesRetriever,
	eventServiceClient automate_event.EventServiceClient,
	configManager *config.Manager,
) (api.ProjectsServer, error)

func NewSubjectPurgeServer

func NewSubjectPurgeServer(_ context.Context,
	l logger.Logger,
	v1 v1SubjectPurger,
	v2 v2SubjectPurger,
) (common.SubjectPurgeServer, error)

func SystemPolicies

func SystemPolicies() []*storage.Policy

SystemPolicies returns a list of system policies that should always exist by default. These should not be visible to the enduser and therefore exist outside of the database.

Types

type PolicyRefresher

type PolicyRefresher interface {
	Refresh(ctx context.Context) error
	RefreshAsync() error
}

func NewPolicyRefresher

func NewPolicyRefresher(ctx context.Context, log logger.Logger, store storage.Storage,
	engine engine.V2Writer) (PolicyRefresher, error)

type PolicyServer

type PolicyServer interface {
	api.PoliciesServer

	EngineUpdateInterceptor() grpc.UnaryServerInterceptor
}

PolicyServer is the server interface for policies: what we defined via protobuf + the update interceptor

func NewMemstorePolicyServer

func NewMemstorePolicyServer(
	ctx context.Context,
	l logger.Logger,
	e engine.V2Writer,
	pl storage_v1.PoliciesLister,
	vChan chan api.Version) (PolicyServer, error)

NewMemstorePolicyServer returns an instance of server.Server

func NewPoliciesServer

func NewPoliciesServer(
	ctx context.Context,
	l logger.Logger,
	s storage.Storage,
	e engine.V2Writer,
	pl storage_v1.PoliciesLister,
	vChan chan api.Version) (PolicyServer, error)

NewPoliciesServer returns a new IAM v2 Policy server.

func NewPostgresPolicyServer

func NewPostgresPolicyServer(
	ctx context.Context,
	l logger.Logger,
	e engine.V2Writer,
	migrationsConfig migration.Config,
	dataMigrationsConfig datamigration.Config,
	pl storage_v1.PoliciesLister,
	vChan chan api.Version) (PolicyServer, error)

NewPostgresPolicyServer instantiates a server.Server that connects to a postgres backend

type ProjectUpdateManager

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

ProjectUpdateManager - project update manager

func NewProjectUpdateManager

func NewProjectUpdateManager(
	eventServiceClient automate_event.EventServiceClient,
	configManager *config.Manager) *ProjectUpdateManager

NewProjectUpdateManager - create a new project update manager

func (*ProjectUpdateManager) Cancel

func (manager *ProjectUpdateManager) Cancel() error

Cancel - stop or cancel domain service project update processes Action

func (*ProjectUpdateManager) EstimatedTimeCompelete

func (manager *ProjectUpdateManager) EstimatedTimeCompelete() time.Time

EstimatedTimeCompelete - the estimated date and time of compeletion of the longest running job Read State

func (*ProjectUpdateManager) Failed

func (manager *ProjectUpdateManager) Failed() bool

Failed - did the last update attempt fail Read State

func (*ProjectUpdateManager) FailureMessage

func (manager *ProjectUpdateManager) FailureMessage() string

FailureMessage - detailed descriptions of the failure Read State

func (*ProjectUpdateManager) PercentageComplete

func (manager *ProjectUpdateManager) PercentageComplete() float64

PercentageComplete - percentage of the job that is complete The percentage complete of the job that is going to run the longest is returned Read State

func (*ProjectUpdateManager) ProcessFailEvent

func (manager *ProjectUpdateManager) ProcessFailEvent(eventMessage *automate_event.EventMsg) error

ProcessFailEvent - react to a domain service failed event Action

func (*ProjectUpdateManager) ProcessStatusEvent

func (manager *ProjectUpdateManager) ProcessStatusEvent(
	eventMessage *automate_event.EventMsg) error

ProcessStatusEvent - record the status update from the domain service. Action

func (*ProjectUpdateManager) Start

func (manager *ProjectUpdateManager) Start() error

Start - start the domain services project update processes Action

func (*ProjectUpdateManager) State

func (manager *ProjectUpdateManager) State() string

State - The current state of the manager. either running or not running Read State

type VersionSwitch

type VersionSwitch struct {
	Version api.Version
}

func NewSwitch

func NewSwitch(c chan api.Version) *VersionSwitch

func (*VersionSwitch) Interceptor

func (v *VersionSwitch) Interceptor(ctx context.Context,
	req interface{},
	info *grpc.UnaryServerInfo,
	handler grpc.UnaryHandler) (interface{}, error)

Jump to

Keyboard shortcuts

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