talos
21 строка · 541.0 Байт
1// This Source Code Form is subject to the terms of the Mozilla Public
2// License, v. 2.0. If a copy of the MPL was not distributed with this
3// file, You can obtain one at http://mozilla.org/MPL/2.0/.
4
5package conditions
6
7import (
8"context"
9"fmt"
10)
11
12// OK is returned by the String method of the passed Condition.
13const OK = "OK"
14
15// Condition is a object which Wait()s for some condition to become true.
16//
17// Condition can describe itself via String() method.
18type Condition interface {
19fmt.Stringer
20Wait(ctx context.Context) error
21}
22