iguazio

package
v0.0.0-...-7b9bfbb Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProjectsRoleHeaderValueNuclio = "nuclio"
	DefaultRequestTimeout         = 60 * time.Second

	// ProjectsRoleHeaderKey not prefixed with "x-nuclio.." this header is used across Iguazio components
	ProjectsRoleHeaderKey = "x-projects-role"
)
View Source
const (
	ProjectType       = "project"
	ProjectTimeLayout = "2006-01-02T15:04:05.000000+00:00"
)

Variables

This section is empty.

Functions

func JobStateInSlice

func JobStateInSlice(jobState JobState, slice []JobState) bool

Types

type Client

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

func NewClient

func NewClient(parentLogger logger.Logger, platformConfiguration *platformconfig.Config) (*Client, error)

func (*Client) Create

func (c *Client) Create(ctx context.Context, createProjectOptions *platform.CreateProjectOptions) error

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, deleteProjectOptions *platform.DeleteProjectOptions) error

func (*Client) Get

func (c *Client) Get(ctx context.Context, getProjectOptions *platform.GetProjectsOptions) ([]platform.Project, error)

func (*Client) GetUpdatedAfter

func (c *Client) GetUpdatedAfter(ctx context.Context, updatedAfterTime *time.Time) ([]platform.Project, error)

func (*Client) Update

func (c *Client) Update(ctx context.Context, updateProjectOptions *platform.UpdateProjectOptions) error

type CreateProjectErrorResponse

type CreateProjectErrorResponse struct {
	Errors []struct {
		Status int    `json:"status,omitempty"`
		Detail string `json:"detail,omitempty"`
	} `json:"errors,omitempty"`
	Meta ResponseMeta
}

type GetProjectResponse

type GetProjectResponse interface {
	ToSingleProjectList() []platform.Project
}

type JobAttributes

type JobAttributes struct {
	Kind   string   `json:"kind,omitempty"`
	State  JobState `json:"state,omitempty"`
	Result string   `json:"result,omitempty"`
}

type JobData

type JobData struct {
	Type       string        `json:"type,omitempty"`
	Attributes JobAttributes `json:"attributes,omitempty"`
}

type JobDetail

type JobDetail struct {
	Data JobData `json:"data,omitempty"`
}

type JobDetailResponse

type JobDetailResponse struct {
	JobDetail
	Meta ResponseMeta
}

type JobState

type JobState string
const (
	JobStateCompleted JobState = "completed"
	JobStateCanceled  JobState = "canceled"
	JobStateFailed    JobState = "failed"
)

type Label

type Label struct {
	Name  string `json:"name,omitempty"`
	Value string `json:"value,omitempty"`
}

type NuclioProject

type NuclioProject struct {
}

type Project

type Project struct {
	Data ProjectData `json:"data,omitempty"`
}

func NewProjectFromProjectConfig

func NewProjectFromProjectConfig(projectConfig *platform.ProjectConfig) Project

func (*Project) GetConfig

func (pl *Project) GetConfig() *platform.ProjectConfig

type ProjectAttributes

type ProjectAttributes struct {
	Name                        string        `json:"name,omitempty"`
	Namespace                   string        `json:"namespace,omitempty"`
	Labels                      []Label       `json:"labels,omitempty"`
	Annotations                 []Label       `json:"annotations,omitempty"`
	Description                 string        `json:"description,omitempty"`
	AdminStatus                 string        `json:"admin_status,omitempty"`
	OperationalStatus           string        `json:"operational_status,omitempty"`
	UpdatedAt                   string        `json:"updated_at,omitempty"`
	NuclioProject               NuclioProject `json:"nuclio_project,omitempty"`
	OwnerUsername               string        `json:"owner_username,omitempty"`
	DefaultFunctionNodeSelector []Label       `json:"default_function_node_selector,omitempty"`
}

type ProjectData

type ProjectData struct {
	Type          string                `json:"type,omitempty"`
	Attributes    ProjectAttributes     `json:"attributes,omitempty"`
	Relationships *ProjectRelationships `json:"relationships,omitempty"`
}

type ProjectDetail

type ProjectDetail struct {
	Data ProjectData `json:"data,omitempty"`
}

func (*ProjectDetail) ToSingleProjectList

func (pl *ProjectDetail) ToSingleProjectList() []platform.Project

ToSingleProjectList returns list of Project

type ProjectDetailResponse

type ProjectDetailResponse struct {
	ProjectDetail
	Meta ResponseMeta
}

type ProjectList

type ProjectList struct {
	Data []ProjectData `json:"data,omitempty"`
}

func (*ProjectList) ToSingleProjectList

func (pl *ProjectList) ToSingleProjectList() []platform.Project

ToSingleProjectList returns list of Project

type ProjectRelationships

type ProjectRelationships struct {
	LastJob struct {
		Data struct {
			ID string `json:"id,omitempty"`
		} `json:"data,omitempty"`
	} `json:"last_job,omitempty"`
}

type ResponseMeta

type ResponseMeta struct {
	Ctx string `json:"ctx"`
}

type Synchronizer

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

func NewSynchronizer

func NewSynchronizer(parentLogger logger.Logger,
	synchronizationIntervalStr string,
	managedNamespaces []string,
	leaderClient leader.Client,
	internalProjectsClient project.Client) (*Synchronizer, error)

func (*Synchronizer) Start

func (c *Synchronizer) Start() error

Jump to

Keyboard shortcuts

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