New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced `Action`s #6

Closed
atcol opened this Issue Jan 1, 2019 · 1 comment

Comments

Projects
None yet
1 participant
@atcol
Copy link
Owner

atcol commented Jan 1, 2019

Background

The Action type represents some side effect, but it currently only has one value constructor - the Shell. The intention is to use this type as part of a uniform interface for the user to weave many different action types without the complexity of manually integrating them.

Domain

There are many use cases for side-effects when weaving:

  • shell - see Shell; commands within the system accessible on the path
  • remote/local "services" -- whether that's HTTP, TCP/IP or even the filesystem
  • mutation of environment - system or user defined variables, state

Although each use case has its own interface (calling a REST service will not use the same mechanics per se as the filesystem) but it will most likely provide or be given some data, which is where Weave comes in.

Goal

Provide value constructors for the Action type that satisfy the most general use cases for non-shell side effects, e.g. a Service (HTTP), Object (filesystem, variable).

Provide a means of interacting with these services in a uniform way.

Enable parsing for these new side effects.

Examples

The following examples should all be possible (but not necessarily be the limits of implementation) without any additional interaction with weave from the user:

service HttpStore {
    "url": "http://my-host:8080/v1/store/some/thing"
}

shell Memory {
  free -m
}

every 5s Memory | HttpStore

@atcol atcol added the enhancement label Jan 1, 2019

@atcol atcol self-assigned this Jan 1, 2019

@atcol

This comment has been minimized.

Copy link
Owner

atcol commented Jan 22, 2019

In master.

@atcol atcol closed this Jan 22, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment