inlineparser

package
v0.0.0-...-adf2f75 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

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