instancesdk

package
v0.18.2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend added in v0.17.0

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

Backend is the instance backend.

func NewBackend added in v0.17.0

func NewBackend(appFactory *cosmos.AppFactory) *Backend

NewBackend returns the backend of the instance sdk.

func (*Backend) Exists added in v0.17.0

func (s *Backend) Exists(request cosmostypes.Request, hash hash.Hash) (bool, error)

Exists returns true if a specific set of data exists in the database, false otherwise

func (*Backend) FetchOrCreate added in v0.17.0

func (s *Backend) FetchOrCreate(request cosmostypes.Request, serviceHash hash.Hash, envHash hash.Hash) (*instance.Instance, error)

FetchOrCreate creates a new instance if needed.

func (*Backend) Get added in v0.17.0

func (s *Backend) Get(request cosmostypes.Request, hash hash.Hash) (*instance.Instance, error)

Get returns the instance that matches given hash.

func (*Backend) List added in v0.17.0

List returns all instances.

type SDK added in v0.17.0

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

SDK is the instance sdk.

func New

func New(client *cosmos.Client) *SDK

New returns the instance sdk.

func (*SDK) Exists added in v0.17.0

func (s *SDK) Exists(hash hash.Hash) (bool, error)

Exists returns if a instance already exists.

func (*SDK) Get added in v0.17.0

func (s *SDK) Get(hash hash.Hash) (*instance.Instance, error)

Get returns the instance that matches given hash.

func (*SDK) List added in v0.17.0

List returns all instances.

Jump to

Keyboard shortcuts

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