inlineparser

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: Apache-2.0 Imports: 9 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const StartBlockKeyword = "@nuclio."

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	Contents    map[string]interface{}
	RawContents string
	Error       error
}

Block represents a block

type ConfigParser

type ConfigParser interface {
	Parse(path string) (map[string]Block, error)
}

ConfigParser parsers inline configuration in files

type InlineParser

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

InlineParser parses comment in code

func NewParser

func NewParser(parentLogger logger.Logger, commentChar string) *InlineParser

func (*InlineParser) Parse

func (p *InlineParser) Parse(path string) (map[string]Block, error)

Parse looks for a block starting with a comment character and "@nuclio.". It then adds this to the list of inline configuration blocks. For example:

@nuclio.configure

function.yaml:
  apiVersion: "nuclio.io/v1"
  kind: "NuclioFunction"
  spec:
    runtime: "golang"
    triggers:
      http:
        numWorkers: 8
        kind: http

type JarParser

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

JarParser parses config in Jar files

func NewJarParser

func NewJarParser(logger logger.Logger) *JarParser

NewJarParser returns a new Jar config parser

func (*JarParser) Parse

func (j *JarParser) Parse(path string) (map[string]map[string]interface{}, error)

Parse parses config in Jar file

Jump to

Keyboard shortcuts

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