server

package
v2.9.4 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 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, config Config) (*apiServer, error)

NewEnterpriseServer returns an implementation of ec.APIServer. TODO: Envs should not be passed by pointer

func StopWorkers added in v2.8.0

func StopWorkers(ctx context.Context, kc kube.Interface, namespace string) error

StopWorkers stops all workers

Types

type Config added in v2.8.0

type Config struct {
	Heartbeat    bool
	Mode         PauseMode
	UnpausedMode string
}

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
	GetKubeClient func() kube.Interface
	Namespace     string

	BackgroundContext context.Context
	Config            pachconfig.Configuration
}

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