application

package
v2.8.21 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 64 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReconnectCode    = 1
	ReconnectMessage = "\nReconnect because the token was refreshed...\n"
)
View Source
const EndOfTransmission = "\u0004"

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(appLister applisters.ApplicationLister, namespace string, enabledNamespaces []string, db db.ArgoDB, cache *servercache.Cache, appResourceTree AppResourceTreeFn, allowedShells []string, sessionManager *sessionmgr.SessionManager, terminalOptions *TerminalOptions) *terminalHandler

NewHandler returns a new terminal handler.

Types

type AppResourceTreeFn

type AppResourceTreeFn func(ctx context.Context, app *appv1.Application) (*appv1.ApplicationTree, error)

func NewServer

func NewServer(
	namespace string,
	kubeclientset kubernetes.Interface,
	appclientset appclientset.Interface,
	appLister applisters.ApplicationLister,
	appInformer cache.SharedIndexInformer,
	appBroadcaster Broadcaster,
	repoClientset apiclient.Clientset,
	cache *servercache.Cache,
	kubectl kube.Kubectl,
	db db.ArgoDB,
	enf *rbac.Enforcer,
	projectLock sync.KeyLock,
	settingsMgr *settings.SettingsManager,
	projInformer cache.SharedIndexInformer,
	enabledNamespaces []string,
	enableK8sEvent []string,
) (application.ApplicationServiceServer, AppResourceTreeFn)

NewServer returns a new instance of the Application service

type Broadcaster

type Broadcaster interface {
	Subscribe(ch chan *appv1.ApplicationWatchEvent, filters ...func(event *appv1.ApplicationWatchEvent) bool) func()
	OnAdd(interface{}, bool)
	OnUpdate(interface{}, interface{})
	OnDelete(interface{})
}

Broadcaster is an interface for broadcasting application informer watch events to multiple subscribers.

type GetSettingsFunc

type GetSettingsFunc func() (*settings.ArgoCDSettings, error)

type PtyHandler

type PtyHandler interface {
	io.Reader
	io.Writer
	remotecommand.TerminalSizeQueue
}

PtyHandler is what remotecommand expects from a pty

type Server

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

Server provides an Application service

func (*Server) Create

Create creates an application

func (*Server) Delete

Delete removes an application and all associated resources

func (*Server) DeleteResource

DeleteResource deletes a specified resource

func (*Server) Get

Get returns an application by name

func (*Server) GetManifests

GetManifests returns application manifests

func (*Server) GetManifestsWithFiles

func (*Server) List

List returns list of applications

func (*Server) ListResourceEvents

ListResourceEvents returns a list of event resources

func (*Server) Patch

Patch patches an application

func (*Server) PatchResource

PatchResource patches a resource

func (*Server) ResourceTree

func (*Server) RevisionChartDetails

func (s *Server) RevisionChartDetails(ctx context.Context, q *application.RevisionMetadataQuery) (*appv1.ChartDetails, error)

RevisionChartDetails returns the helm chart metadata, as fetched from the reposerver

func (*Server) RevisionMetadata

func (*Server) Rollback

func (*Server) Sync

Sync syncs an application to its target state

func (*Server) Update

Update updates an application

func (*Server) UpdateSpec

UpdateSpec updates an application spec and filters out any invalid parameter overrides

type TerminalCommand

type TerminalCommand struct {
	Code int
}

TerminalCommand is the struct for websocket commands,For example you need ask client to reconnect

type TerminalMessage

type TerminalMessage struct {
	Operation string `json:"operation"`
	Data      string `json:"data"`
	Rows      uint16 `json:"rows"`
	Cols      uint16 `json:"cols"`
}

TerminalMessage is the struct for websocket message.

type TerminalOptions

type TerminalOptions struct {
	DisableAuth bool
	Enf         *rbac.Enforcer
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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