Documentation ¶
Index ¶
- Variables
- func Dashboard(w http.ResponseWriter, r *http.Request)
- func GenerateAndRegisterSerfResolver(lookup func() []serf.Member)
- func GetRouter(context ServerContext) http.Handler
- func Launch(s ServerContext, w http.ResponseWriter, r *http.Request)
- func NewSerfResolverBuilder(lookup func() []serf.Member) resolver.Builder
- func ParsingConfigs(s ServerContext, w http.ResponseWriter, r *http.Request)
- func ReadParsingConfig(s ServerContext, w http.ResponseWriter, r *http.Request)
- func Tasks(s ServerContext, w http.ResponseWriter, r *http.Request)
- type Client
- func (cs *Client) AddFailedAggregate()
- func (cs *Client) AddFailedParsing()
- func (cs *Client) AddSuccessAggregate()
- func (cs *Client) AddSuccessParsing()
- func (cl *Client) Close() error
- func (cs *Client) CopyStats(to *clientStats)
- func (cl *Client) Dispatch(iteration uint64, parsingConfigName string, shouldWait bool) (string, error)
- func (cs *Client) GetStats() *StatInfo
- type Cluster
- type CombaineServer
- type CombaineServerConfig
- type FSM
- type FSMCommand
- type FSMSnapshot
- type FSMStore
- func (s *FSMStore) DistributionStatistic() [][2]string
- func (s *FSMStore) Dump() map[string][]string
- func (s *FSMStore) List(host string) []string
- func (s *FSMStore) Put(host, config string) chan struct{}
- func (s *FSMStore) Remove(host, config string)
- func (s *FSMStore) Replace(newStore map[string]map[string]chan struct{})
- type Observer
- type OpenFiles
- type Resolver
- type ServerContext
- type StatInfo
Constants ¶
This section is empty.
Variables ¶
var GlobalObserver = Observer{ // contains filtered or unexported fields }
GlobalObserver is storage for client registations
Functions ¶
func Dashboard ¶
func Dashboard(w http.ResponseWriter, r *http.Request)
Dashboard handle http request abount internal statistics
func GenerateAndRegisterSerfResolver ¶ added in v1.0.0
GenerateAndRegisterSerfResolver generates and registers Serf Resolver.
func GetRouter ¶
func GetRouter(context ServerContext) http.Handler
GetRouter return mux root router
func Launch ¶
func Launch(s ServerContext, w http.ResponseWriter, r *http.Request)
Launch run full iteration for config
func NewSerfResolverBuilder ¶ added in v1.0.0
NewSerfResolverBuilder creates a new serf resolver builder
func ParsingConfigs ¶
func ParsingConfigs(s ServerContext, w http.ResponseWriter, r *http.Request)
ParsingConfigs list parsing configs names
func ReadParsingConfig ¶
func ReadParsingConfig(s ServerContext, w http.ResponseWriter, r *http.Request)
ReadParsingConfig return parsing config content before return UpdateByCombainerConfig update config
func Tasks ¶
func Tasks(s ServerContext, w http.ResponseWriter, r *http.Request)
Tasks return information about parsing tasks that should be performed by config
Types ¶
type Client ¶
type Client struct { ID uint64 // contains filtered or unexported fields }
Client is a distributor of tasks across the computation grid
func (*Client) AddFailedAggregate ¶
func (cs *Client) AddFailedAggregate()
func (*Client) AddFailedParsing ¶
func (cs *Client) AddFailedParsing()
func (*Client) AddSuccessAggregate ¶
func (cs *Client) AddSuccessAggregate()
func (*Client) AddSuccessParsing ¶
func (cs *Client) AddSuccessParsing()
type Cluster ¶ added in v0.10.7
type Cluster struct { Name string // contains filtered or unexported fields }
Cluster is wrapper for access cluster members
func NewCluster ¶ added in v0.10.7
func NewCluster(cfg repository.ClusterConfig) (*Cluster, error)
NewCluster create and initialize Cluster instance
func (*Cluster) AliveMembers ¶ added in v1.0.0
AliveMembers return alive serf members
func (*Cluster) EventHandler ¶ added in v0.10.7
func (c *Cluster) EventHandler()
EventHandler is used to handle events from the serf cluster
type CombaineServer ¶ added in v0.10.7
type CombaineServer struct { Configuration CombaineServerConfig CombainerConfig repository.CombainerConfig // contains filtered or unexported fields }
CombaineServer main combaine object
func New ¶ added in v0.10.7
func New(config CombaineServerConfig) (*CombaineServer, error)
New create new combainer server
func (*CombaineServer) GetHosts ¶ added in v0.10.7
func (c *CombaineServer) GetHosts() []string
GetHosts return alive cluster members
func (*CombaineServer) Serve ¶ added in v0.10.7
func (c *CombaineServer) Serve() error
Serve run main event loop
type CombaineServerConfig ¶ added in v0.10.7
type CombaineServerConfig struct { // period of the locks rechecking Period time.Duration // Addrto listen for incoming http REST API requests RestEndpoint string // Active bool }
CombaineServerConfig contains config from main combaine conf
type FSM ¶ added in v0.10.7
type FSM Cluster
FSM is cluster state
type FSMCommand ¶ added in v0.10.7
type FSMCommand struct { Type string `json:"type"` Host string `json:"host"` Config string `json:"config"` }
FSMCommand contains cluster storage operation with data
type FSMSnapshot ¶ added in v0.10.7
type FSMSnapshot struct {
Data []byte
}
FSMSnapshot ...
func (*FSMSnapshot) Persist ¶ added in v0.10.7
func (s *FSMSnapshot) Persist(sink raft.SnapshotSink) error
Persist ...
type FSMStore ¶ added in v0.10.7
FSMStore contains dispached congis
func (*FSMStore) DistributionStatistic ¶ added in v0.10.7
DistributionStatistic dump number of configs assigned to hosts
type Observer ¶
Observer object with registered clients
func (*Observer) GetClientsStats ¶ added in v0.9.1
GetClientsStats return map with client stats
func (*Observer) RegisterClient ¶
RegisterClient register client in Observer ReRegister client is UnregisterClient for previously registered client, but all stats are copied
func (*Observer) UnregisterClient ¶
UnregisterClient unregister client in Observer Deregister only a yourself by checking id
type Resolver ¶ added in v1.0.0
type Resolver struct {
// contains filtered or unexported fields
}
Resolver is Serf members resolver
func (*Resolver) ResolveNow ¶ added in v1.0.0
func (r *Resolver) ResolveNow(opt resolver.ResolveNowOption)
ResolveNow invoke an immediate resolution of the target that this serfResolver watches.
type ServerContext ¶
type ServerContext interface {
GetHosts() []string
}
ServerContext contains server context with repository