client

package
v0.0.0-...-a7f6470 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Agent

func Agent(agent string) error

Agent function call agent url

func ProcessAction

func ProcessAction(agent, jsonString string)

ProcessAction performs request approval in given agent

func Register

func Register(agent, fname string)

Register function upload given meta-data to the agent and register them in its TFC

func RegisterRequest

func RegisterRequest(agent string, src string, dst string)

RegisterRequest performs registration of transfer request in given agent (PULL mode)

func ShowRequests

func ShowRequests(agent, rtype string)

ShowRequests list request of a given type from an agent

func Transfer

func Transfer(agent, src, dst string)

Transfer performs transfer data from source to destination (PUSH model)

Types

type ActionRequest

type ActionRequest struct {
	Delay    int    `json:"delay"`    // transfer delay time, i.e. post-pone transfer
	Id       string `json:"id"`       // unique id of each request
	Priority int    `json:"priority"` // priority of request
	Action   string `json:"action"`   // which action to apply
}

ActionRequest provides structure submitted by clients to perform certain action on main agent

type AgentFiles

type AgentFiles struct {
	Alias string
	Url   string
	Files []string
}

AgentFiles holds agent alias/url and list of files to transfer

Jump to

Keyboard shortcuts

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