ecflow_client

package module
v0.0.0-...-4d08954 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2019 License: MIT Imports: 5 Imported by: 2

README

ecflow-client-go

An ecFlow client for Golang using ecFlow C++ API through SWIG.

Install

ecflow-client-go needs ecFlow (and boost required by ecFlow).

Set some environment variables before build the library.

export ECFLOW_BUILD_DIR=/some/path/to/ecflow/build
export ECFLOW_SOURCE_DIR=/some/path/to/ecflow/source
export BOOST_LIB_DIR=/some/path/to/boost/stage/lib

Getting Started

ecflowHost := "some host"
ecflowPort := "some port"

client := ecflow_client.CreateEcflowClient(ecflowHost, ecflowPort)
defer client.Close()

ret := client.Sync()
if ret != 0 {
	log.Fatal("sync has error")
}

records := client.StatusRecords()
for _, record := range records {
	fmt.Printf("%s: [%s]\n", record.Path, record.Status)
}

License

Copyright 2019, perillaroc.

ecflow-client-go is licensed under MIT License.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Swig_escape_always_false bool
View Source
var Swig_escape_val interface{}

Functions

func DeleteEcflowClientWrapper

func DeleteEcflowClientWrapper(arg1 EcflowClientWrapper)

func DeleteNodeStatusRecord

func DeleteNodeStatusRecord(arg1 NodeStatusRecord)

func DeleteNodeStatusRecordVector

func DeleteNodeStatusRecordVector(arg1 NodeStatusRecordVector)

func Swig_free

func Swig_free(arg1 uintptr)

func Swig_malloc

func Swig_malloc(arg1 int) (_swig_ret uintptr)

Types

type EcflowClient

type EcflowClient struct {
	ServerHost    string
	ServerPort    string
	CollectedTime time.Time
	// contains filtered or unexported fields
}

func CreateEcflowClient

func CreateEcflowClient(host string, port string) *EcflowClient

func (*EcflowClient) Close

func (c *EcflowClient) Close()

func (*EcflowClient) SetConnectTimeout

func (c *EcflowClient) SetConnectTimeout(timeout int)

func (*EcflowClient) StatusRecords

func (c *EcflowClient) StatusRecords() []StatusRecord

func (*EcflowClient) StatusRecordsJson

func (c *EcflowClient) StatusRecordsJson() string

func (*EcflowClient) Sync

func (c *EcflowClient) Sync() int

type EcflowClientWrapper

type EcflowClientWrapper interface {
	Swigcptr() uintptr
	SwigIsEcflowClientWrapper()
	SetConnectTimeout(arg2 int)
	Sync() (_swig_ret int)
	StatusRecords() (_swig_ret NodeStatusRecordVector)
	StatusRecordsJson() (_swig_ret string)
	ErrorMessage() (_swig_ret string)
}

func NewEcflowClientWrapper

func NewEcflowClientWrapper(arg1 string, arg2 string) (_swig_ret EcflowClientWrapper)

type NodeStatusRecord

type NodeStatusRecord interface {
	Swigcptr() uintptr
	SwigIsNodeStatusRecord()
	SetPath_(arg2 string)
	GetPath_() (_swig_ret string)
	SetStatus_(arg2 string)
	GetStatus_() (_swig_ret string)
}

func NewNodeStatusRecord

func NewNodeStatusRecord() (_swig_ret NodeStatusRecord)

type NodeStatusRecordVector

type NodeStatusRecordVector interface {
	Swigcptr() uintptr
	SwigIsNodeStatusRecordVector()
	Size() (_swig_ret int64)
	Capacity() (_swig_ret int64)
	Reserve(arg2 int64)
	IsEmpty() (_swig_ret bool)
	Clear()
	Add(arg2 NodeStatusRecord)
	Get(arg2 int) (_swig_ret NodeStatusRecord)
	Set(arg2 int, arg3 NodeStatusRecord)
}

func NewNodeStatusRecordVector

func NewNodeStatusRecordVector(a ...interface{}) NodeStatusRecordVector

func NewNodeStatusRecordVector__SWIG_0

func NewNodeStatusRecordVector__SWIG_0() (_swig_ret NodeStatusRecordVector)

func NewNodeStatusRecordVector__SWIG_1

func NewNodeStatusRecordVector__SWIG_1(arg1 int64) (_swig_ret NodeStatusRecordVector)

func NewNodeStatusRecordVector__SWIG_2

func NewNodeStatusRecordVector__SWIG_2(arg1 NodeStatusRecordVector) (_swig_ret NodeStatusRecordVector)

type StatusRecord

type StatusRecord struct {
	Path   string `json:"path"`
	Status string `json:"status"`
}

type SwigcptrEcflowClientWrapper

type SwigcptrEcflowClientWrapper uintptr

func (SwigcptrEcflowClientWrapper) ErrorMessage

func (arg1 SwigcptrEcflowClientWrapper) ErrorMessage() (_swig_ret string)

func (SwigcptrEcflowClientWrapper) SetConnectTimeout

func (arg1 SwigcptrEcflowClientWrapper) SetConnectTimeout(arg2 int)

func (SwigcptrEcflowClientWrapper) StatusRecords

func (arg1 SwigcptrEcflowClientWrapper) StatusRecords() (_swig_ret NodeStatusRecordVector)

func (SwigcptrEcflowClientWrapper) StatusRecordsJson

func (arg1 SwigcptrEcflowClientWrapper) StatusRecordsJson() (_swig_ret string)

func (SwigcptrEcflowClientWrapper) SwigIsEcflowClientWrapper

func (p SwigcptrEcflowClientWrapper) SwigIsEcflowClientWrapper()

func (SwigcptrEcflowClientWrapper) Swigcptr

func (p SwigcptrEcflowClientWrapper) Swigcptr() uintptr

func (SwigcptrEcflowClientWrapper) Sync

func (arg1 SwigcptrEcflowClientWrapper) Sync() (_swig_ret int)

type SwigcptrNodeStatusRecord

type SwigcptrNodeStatusRecord uintptr

func (SwigcptrNodeStatusRecord) GetPath_

func (arg1 SwigcptrNodeStatusRecord) GetPath_() (_swig_ret string)

func (SwigcptrNodeStatusRecord) GetStatus_

func (arg1 SwigcptrNodeStatusRecord) GetStatus_() (_swig_ret string)

func (SwigcptrNodeStatusRecord) SetPath_

func (arg1 SwigcptrNodeStatusRecord) SetPath_(arg2 string)

func (SwigcptrNodeStatusRecord) SetStatus_

func (arg1 SwigcptrNodeStatusRecord) SetStatus_(arg2 string)

func (SwigcptrNodeStatusRecord) SwigIsNodeStatusRecord

func (p SwigcptrNodeStatusRecord) SwigIsNodeStatusRecord()

func (SwigcptrNodeStatusRecord) Swigcptr

func (p SwigcptrNodeStatusRecord) Swigcptr() uintptr

type SwigcptrNodeStatusRecordVector

type SwigcptrNodeStatusRecordVector uintptr

func (SwigcptrNodeStatusRecordVector) Add

func (SwigcptrNodeStatusRecordVector) Capacity

func (arg1 SwigcptrNodeStatusRecordVector) Capacity() (_swig_ret int64)

func (SwigcptrNodeStatusRecordVector) Clear

func (arg1 SwigcptrNodeStatusRecordVector) Clear()

func (SwigcptrNodeStatusRecordVector) Get

func (arg1 SwigcptrNodeStatusRecordVector) Get(arg2 int) (_swig_ret NodeStatusRecord)

func (SwigcptrNodeStatusRecordVector) IsEmpty

func (arg1 SwigcptrNodeStatusRecordVector) IsEmpty() (_swig_ret bool)

func (SwigcptrNodeStatusRecordVector) Reserve

func (arg1 SwigcptrNodeStatusRecordVector) Reserve(arg2 int64)

func (SwigcptrNodeStatusRecordVector) Set

func (SwigcptrNodeStatusRecordVector) Size

func (arg1 SwigcptrNodeStatusRecordVector) Size() (_swig_ret int64)

func (SwigcptrNodeStatusRecordVector) SwigIsNodeStatusRecordVector

func (p SwigcptrNodeStatusRecordVector) SwigIsNodeStatusRecordVector()

func (SwigcptrNodeStatusRecordVector) Swigcptr

Directories

Path Synopsis
example

Jump to

Keyboard shortcuts

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