gapi

package
v0.0.0-...-54296da Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2017 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package gapi defines the interface that graph API generators must meet.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	Hostname string // uuid for the host, required for GAPI
	World    World
	Noop     bool
	NoWatch  bool
}

Data is the set of input values passed into the GAPI structs via Init.

type GAPI

type GAPI interface {
	Init(Data) error               // initializes the GAPI and passes in useful data
	Graph() (*pgraph.Graph, error) // returns the most recent pgraph
	Next() chan error              // returns a stream of switch events
	Close() error                  // shutdown the GAPI
}

GAPI is a Graph API that represents incoming graphs and change streams.

type World

type World interface {
	ResExport([]resources.Res) error
	// FIXME: should this method take a "filter" data struct instead of many args?
	ResCollect(hostnameFilter, kindFilter []string) ([]resources.Res, error)
}

World is an interface to the rest of the different graph state. It allows the GAPI to store state and exchange information throughout the cluster. It is the interface each machine uses to communicate with the rest of the world.

Jump to

Keyboard shortcuts

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