opensearchinspect

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package opensearchinspect provides bounded, read-only OpenSearch metadata inspection.

Index

Constants

View Source
const (
	DefaultMaxTargets = 2000
	DefaultMaxFields  = 20000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field struct {
	Name         string   `json:"name"`
	Types        []string `json:"types"`
	Searchable   bool     `json:"searchable"`
	Aggregatable bool     `json:"aggregatable"`
	Conflicting  bool     `json:"conflicting,omitempty"`
}

type FieldCatalog

type FieldCatalog struct {
	Target         Target  `json:"target"`
	Fields         []Field `json:"fields"`
	Truncated      bool    `json:"truncated,omitempty"`
	TruncateReason string  `json:"truncateReason,omitempty"`
}

type Inspector

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

func New

func New(client *opensearch.Client, options Options) (*Inspector, error)

func (*Inspector) Fields

func (i *Inspector) Fields(ctx context.Context, target Target) (FieldCatalog, error)

func (*Inspector) Targets

func (i *Inspector) Targets(ctx context.Context) (TargetCatalog, error)

type Options

type Options struct {
	MaxTargets int
	MaxFields  int
}

type Target

type Target struct {
	Name       string `json:"name"`
	Kind       string `json:"kind"`
	Hidden     bool   `json:"hidden,omitempty"`
	System     bool   `json:"system,omitempty"`
	DataStream string `json:"dataStream,omitempty"`
}

type TargetCatalog

type TargetCatalog struct {
	Targets        []Target `json:"targets"`
	Truncated      bool     `json:"truncated,omitempty"`
	TruncateReason string   `json:"truncateReason,omitempty"`
}

Jump to

Keyboard shortcuts

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