Documentation ¶
Overview ¶
Author:: Gina Peers <gpeers@chef.io>, Salim Afiune <afiune@chef.io> Copyright:: Copyright 2018, Chef Software Inc.
Index ¶
- func FromInternalFormatToList(entries []*util.FeedEntry) ([]*automate_feed.FeedEntry, error)
- type Server
- func (s *Server) GetFeed(ctx context.Context, req *automate_feed.FeedRequest) (*automate_feed.FeedResponse, error)
- func (s *Server) GetFeedSummary(ctx context.Context, req *automate_feed.FeedSummaryRequest) (*automate_feed.FeedSummaryResponse, error)
- func (s *Server) GetFeedTimeline(ctx context.Context, req *automate_feed.FeedTimelineRequest) (*automate_feed.FeedTimelineResponse, error)
- func (s *Server) HandleEvent(ctx context.Context, req *automate_event.EventMsg) (*automate_event.EventResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromInternalFormatToList ¶
func FromInternalFormatToList(entries []*util.FeedEntry) ([]*automate_feed.FeedEntry, error)
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func New ¶
func New(config *config.FeedConfig, conn *relaxting.ES2Backend) *Server
New creates and starts the automate-feed gRPC server
func (*Server) GetFeed ¶
func (s *Server) GetFeed(ctx context.Context, req *automate_feed.FeedRequest) (*automate_feed.FeedResponse, error)
TODO: @gcp refactor so that param validations & resulting grpc errors thrown here TODO: @gcp consistent behavior on err w/r/t returning either empty result set or nil
func (*Server) GetFeedSummary ¶
func (s *Server) GetFeedSummary(ctx context.Context, req *automate_feed.FeedSummaryRequest) (*automate_feed.FeedSummaryResponse, error)
func (*Server) GetFeedTimeline ¶
func (s *Server) GetFeedTimeline(ctx context.Context, req *automate_feed.FeedTimelineRequest) (*automate_feed.FeedTimelineResponse, error)
GetFeedTimeline - feed timeline consists of multiple lines, one for each type of action: create = 2 update = 1 delete = 0. This function gets the data for each line of the feed timeline (the "guitar strings" graph).
---------------------------------------------------------------------------- | Jan 28 | Jan 29 | Jan 30 | |_____________b__________|________________________|_____________i__________|'create' |________________________|_____________c__________|________________________|'update' |________________________|________________________|________________________|'delete' ----------------------------------------------------------------------------
func (*Server) HandleEvent ¶
func (s *Server) HandleEvent(ctx context.Context, req *automate_event.EventMsg) (*automate_event.EventResponse, error)