server

package
v2.7.0-nightly.20230519 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteEnterpriseConfigFromEtcd

func DeleteEnterpriseConfigFromEtcd(ctx context.Context, etcd *clientv3.Client) error

func EnterpriseConfigCollection

func EnterpriseConfigCollection(db *pachsql.DB, listener col.PostgresListener) col.PostgresCollection

func EnterpriseConfigPostgresMigration

func EnterpriseConfigPostgresMigration(ctx context.Context, tx *pachsql.Tx, etcd *clientv3.Client) error

The enterpriseConfig collection stores the information necessary for the enterprise-service to heartbeat to the license service for ongoing license validity checks. For clusters with enterprise, if this information were lost, the cluster would eventually become locked out. We migrate This data is migrated to postgres so that the data stored in etcd can truly be considered ephemeral.

func NewEnterpriseServer

func NewEnterpriseServer(env *Env, heartbeat bool) (*apiServer, error)

NewEnterpriseServer returns an implementation of ec.APIServer.

Types

type Env

type Env struct {
	DB       *pachsql.DB
	Listener col.PostgresListener
	TxnEnv   *txnenv.TransactionEnv

	EtcdClient *clientv3.Client
	EtcdPrefix string

	AuthServer    auth.APIServer
	GetPachClient func(context.Context) *client.APIClient

	BackgroundContext context.Context

	Config serviceenv.Configuration
	// contains filtered or unexported fields
}

func EnvFromServiceEnv

func EnvFromServiceEnv(senv serviceenv.ServiceEnv, etcdPrefix string, txEnv *txnenv.TransactionEnv, options ...Option) *Env

func (Env) StopWorkers

func (env Env) StopWorkers(ctx context.Context) error

StopWorkers stops all workers

type Option

type Option func(Env) Env

func WithMode

func WithMode(mode PauseMode) Option

func WithUnpausedMode

func WithUnpausedMode(mode string) Option

type PauseMode

type PauseMode uint8

PauseMode represents whether a server is unpaused, paused, a sidecar or an enterprise server.

const (
	UnpausableMode PauseMode = iota
	FullMode
	PausedMode
)

Jump to

Keyboard shortcuts

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