Help us shape the future of Go! Take the 2026 Go Developer Survey

server

package
v3.5.6 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 132 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoSession = status.Errorf(codes.Unauthenticated, "no session information")

ErrNoSession indicates no auth token was supplied as part of a request

Functions

This section is empty.

Types

type ApplicationSetOpts

type ApplicationSetOpts struct {
	GitSubmoduleEnabled      bool
	EnableNewGitFileGlobbing bool
	ScmRootCAPath            string
	AllowedScmProviders      []string
	EnableScmProviders       bool
	EnableGitHubAPIMetrics   bool
}

type ArgoCDServer

type ArgoCDServer struct {
	ArgoCDServerOpts
	ApplicationSetOpts

	Shutdown func()
	// contains filtered or unexported fields
}

ArgoCDServer is the API server for Argo CD

func NewServer

func NewServer(ctx context.Context, opts ArgoCDServerOpts, appsetOpts ApplicationSetOpts) *ArgoCDServer

NewServer returns a new instance of the Argo CD API server

func (*ArgoCDServer) Authenticate

func (server *ArgoCDServer) Authenticate(ctx context.Context) (context.Context, error)

Authenticate checks for the presence of a valid token when accessing server-side resources.

func (*ArgoCDServer) Init

func (server *ArgoCDServer) Init(ctx context.Context)

Init starts informers used by the API server

func (*ArgoCDServer) Initialized

func (server *ArgoCDServer) Initialized() bool

func (*ArgoCDServer) Listen

func (server *ArgoCDServer) Listen() (*Listeners, error)

func (*ArgoCDServer) Run

func (server *ArgoCDServer) Run(ctx context.Context, listeners *Listeners)

Run runs the API Server We use k8s.io/code-generator/cmd/go-to-protobuf to generate the .proto files from the API types. k8s.io/ go-to-protobuf uses protoc-gen-gogo, which comes from gogo/protobuf (a fork of golang/protobuf).

func (*ArgoCDServer) TerminateRequested

func (server *ArgoCDServer) TerminateRequested() bool

TerminateRequested returns whether a shutdown was initiated by a signal or context cancel as opposed to a watch.

type ArgoCDServerOpts

type ArgoCDServerOpts struct {
	DisableAuth             bool
	ContentTypes            []string
	EnableGZip              bool
	Insecure                bool
	StaticAssetsDir         string
	ListenPort              int
	ListenHost              string
	MetricsPort             int
	MetricsHost             string
	Namespace               string
	DexServerAddr           string
	DexTLSConfig            *dexutil.DexTLSConfig
	BaseHRef                string
	RootPath                string
	DynamicClientset        dynamic.Interface
	KubeControllerClientset client.Client
	KubeClientset           kubernetes.Interface
	AppClientset            appclientset.Interface
	RepoClientset           repoapiclient.Clientset
	Cache                   *servercache.Cache
	RepoServerCache         *repocache.Cache
	RedisClient             *redis.Client
	TLSConfigCustomizer     tlsutil.ConfigCustomizer
	XFrameOptions           string
	ContentSecurityPolicy   string
	ApplicationNamespaces   []string
	EnableProxyExtension    bool
	WebhookParallelism      int
	WebhookRefreshWorkers   int
	EnableK8sEvent          []string
	HydratorEnabled         bool
	SyncWithReplaceAllowed  bool
}

type ArgoCDServiceSet

type ArgoCDServiceSet struct {
	ClusterService        *cluster.Server
	RepoService           *repository.Server
	RepoCredsService      *repocreds.Server
	SessionService        *session.Server
	ApplicationService    applicationpkg.ApplicationServiceServer
	AppResourceTreeFn     application.AppResourceTreeFn
	ApplicationSetService applicationsetpkg.ApplicationSetServiceServer
	ProjectService        *project.Server
	SettingsService       *settings.Server
	AccountService        *account.Server
	NotificationService   notificationpkg.NotificationServiceServer
	CertificateService    *certificate.Server
	GpgkeyService         *gpgkey.Server
	VersionService        *version.Server
}

type GracefulRestartSignal

type GracefulRestartSignal struct{}

GracefulRestartSignal implements a signal to be used for a graceful restart trigger.

func (GracefulRestartSignal) Signal

func (g GracefulRestartSignal) Signal()

Signal is a part of os.Signal interface doing nothing.

func (GracefulRestartSignal) String

func (g GracefulRestartSignal) String() string

String is a part of os.Signal interface to represent a signal as a string.

type HTTPMetricsRegistry

type HTTPMetricsRegistry interface {
	// IncExtensionRequestCounter will increase the request counter for the given
	// extension with the given status.
	IncExtensionRequestCounter(extension string, status int)
	// ObserveExtensionRequestDuration will register the request roundtrip duration
	// between Argo CD API Server and the extension backend service for the given
	// extension.
	ObserveExtensionRequestDuration(extension string, duration time.Duration)
}

HTTPMetricsRegistry exposes operations to update http metrics in the Argo CD API server.

type Listeners

type Listeners struct {
	Main        net.Listener
	Metrics     net.Listener
	GatewayConn *grpc.ClientConn
}

func (*Listeners) Close

func (l *Listeners) Close() error

Jump to

Keyboard shortcuts

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