diff

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Do

type Do func(a crud.Event) (crud.Arg, error)

Do is the worker function to sync the diff

type Stats added in v1.8.0

type Stats struct {
	CreateOps *utils.AtomicInt32Counter
	UpdateOps *utils.AtomicInt32Counter
	DeleteOps *utils.AtomicInt32Counter
}

Stats holds the stats related to a Solve.

type Syncer

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

Syncer takes in a current and target state of Kong, diffs them, generating a Graph to get Kong from current to target state.

func NewSyncer

func NewSyncer(opts SyncerOpts) (*Syncer, error)

NewSyncer constructs a Syncer.

func (*Syncer) Run

func (sc *Syncer) Run(ctx context.Context, parallelism int, d Do) []error

Run starts a diff and invokes d for every diff.

func (*Syncer) Solve added in v1.8.0

func (sc *Syncer) Solve(ctx context.Context, parallelism int, dry bool) (Stats, []error)

Solve generates a diff and walks the graph.

type SyncerOpts added in v1.8.0

type SyncerOpts struct {
	CurrentState *state.KongState
	TargetState  *state.KongState

	KongClient    *kong.Client
	KonnectClient *konnect.Client

	SilenceWarnings bool
	StageDelaySec   int
}

Jump to

Keyboard shortcuts

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