fsm

package
v0.0.0-...-36d1bee Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeState

func ComputeState(obj *github.MungeObject) error

ComputeState can be used to compute the state of each PR.

Types

type ChangesNeeded

type ChangesNeeded struct{}

ChangesNeeded is the state when the ball is in the author's court.

func (*ChangesNeeded) Name

func (c *ChangesNeeded) Name() string

Name is the name of the state machine's state.

func (*ChangesNeeded) Process

func (c *ChangesNeeded) Process(obj *github.MungeObject) (State, error)

Process does the necessary processing to compute whether to stay in this state, or proceed to the next.

type End

type End struct{}

End is the end state when we can't proceed.

func (*End) Initialize

func (e *End) Initialize(obj *github.MungeObject) error

Initialize can be used to set up initialization.

func (*End) Name

func (e *End) Name() string

Name is the name of the state machine's state.

func (*End) Process

func (e *End) Process(obj *github.MungeObject) (State, error)

Process does the necessary processing to compute whether to stay in this state, or proceed to the next.

type NeedsReview

type NeedsReview struct{}

NeedsReview is the state when the ball is in the reviewer's court.

func (*NeedsReview) Name

func (nr *NeedsReview) Name() string

Name is the name of the state machine's state.

func (*NeedsReview) Process

func (nr *NeedsReview) Process(obj *github.MungeObject) (State, error)

Process does the necessary processing to compute whether to stay in this state, or proceed to the next.

type PreReview

type PreReview struct{}

PreReview is the state before the review starts.

func (*PreReview) Name

func (p *PreReview) Name() string

Name is the name of the state machine's state.

func (*PreReview) Process

func (p *PreReview) Process(obj *githubhelper.MungeObject) (State, error)

Process does the necessary processing to compute whether to stay in this state, or proceed to the next.

type State

type State interface {
	Process(obj *github.MungeObject) (State, error)
	Name() string
}

State is the interface implemented by all states.

Jump to

Keyboard shortcuts

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