Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
An Auth component is able to validate a username and password and returns a nil error only if the
type Option ¶ added in v1.1.0
type Option func(s *Server)
Option functions configure the webserver with various values.
func WithLogger ¶ added in v1.1.0
func WithLogger(l hclog.Logger) Option
WithLogger sets the logger for the server.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is an abstraction over all methods needed to operate the state server. It includes the required Store and binds all HTTP methods to the appropriate routes.
func New ¶
New returns an initialized server, but not one that is prepared to serve. The embedded echo.Echo instance's Serve method must still be called.
type Store ¶
type Store interface { Get([]byte) ([]byte, error) Put([]byte, []byte) error Del([]byte) error Close() error Sync() error }
A Store is an abstraction to a persistent storage system that terrastate will use to durably store the state data it is entrusted with. This may very well be a remote KV store, in which case terrastate is providing AAA services on top of the existing KV store.