model

package
v3.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertAccessLogs

func ConvertAccessLogs(accessLogs []*AccessLog) (logs []string)

func ConvertErrorLogs

func ConvertErrorLogs(errorLogs []*ErrorLog) (logs []string)

func NginxConfPath added in v3.2.1

func NginxConfPath(ctx context.Context, nginxInfo *ProcessInfo) string

func NginxPrefix added in v3.2.1

func NginxPrefix(ctx context.Context, nginxInfo *ProcessInfo) string

Types

type APIDetails

type APIDetails struct {
	URL      string
	Listen   string
	Location string
	Ca       string
}

type AccessLog

type AccessLog struct {
	Name        string
	Format      string
	Permissions string
	Readable    bool
}

type ConfigApplyMessage

type ConfigApplyMessage struct {
	Error         error
	CorrelationID string
	InstanceID    string
}

type ConfigApplySuccess

type ConfigApplySuccess struct {
	ConfigContext     *NginxConfigContext
	DataPlaneResponse *v1.DataPlaneResponse
}

type ErrorLog

type ErrorLog struct {
	Name        string
	LogLevel    string
	Permissions string
	Readable    bool
}

type FileAction

type FileAction int
const (
	Add FileAction = iota + 1
	Update
	Delete
	Unchanged
)

type FileCache

type FileCache struct {
	File   *mpi.File
	Action FileAction
}

type ManifestFile

type ManifestFile struct {
	ManifestFileMeta *ManifestFileMeta `json:"manifest_file_meta"`
}

type ManifestFileMeta

type ManifestFileMeta struct {
	// The full path of the file
	Name string `json:"name"`
	// The hash of the file contents sha256, hex encoded
	Hash string `json:"hash"`
	// The size of the file in bytes
	Size int64 `json:"size"`
	// File referenced in the NGINX config
	Referenced bool `json:"referenced"`
}

type NginxConfigContext

type NginxConfigContext struct {
	StubStatus       *APIDetails
	PlusAPI          *APIDetails
	StubStatuses     []*APIDetails
	PlusAPIs         []*APIDetails
	InstanceID       string
	ConfigPath       string
	Files            []*v1.File
	AccessLogs       []*AccessLog
	ErrorLogs        []*ErrorLog
	NAPSysLogServers []string
	Includes         []string
}

func (*NginxConfigContext) Equal

func (ncc *NginxConfigContext) Equal(otherNginxConfigContext *NginxConfigContext) bool

type ProcessInfo added in v3.2.1

type ProcessInfo struct {
	ConfigureArgs   map[string]interface{}
	Version         string
	Prefix          string
	ConfPath        string
	ExePath         string
	LoadableModules []string
	DynamicModules  []string
	ProcessID       int32
}

type ServerType added in v3.2.0

type ServerType int
const (
	Command ServerType = iota
	Auxiliary
)

func (ServerType) String added in v3.2.0

func (s ServerType) String() string

type WriteStatus

type WriteStatus int
const (
	RollbackRequired WriteStatus = iota + 1
	NoChange
	Error
	OK
)

Jump to

Keyboard shortcuts

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