Documentation ¶
Overview ¶
Package service provides the implementation of the Emitto service.
Index ¶
- func ValidateUpdateMask(obj interface{}, mask *mpb.FieldMask) error
- type FleetspeakAdminClient
- type Service
- func (s *Service) AddLocation(ctx context.Context, req *svpb.AddLocationRequest) (*emptypb.Empty, error)
- func (s *Service) AddRule(ctx context.Context, req *svpb.AddRuleRequest) (*emptypb.Empty, error)
- func (s *Service) DeleteLocation(ctx context.Context, req *svpb.DeleteLocationRequest) (*emptypb.Empty, error)
- func (s *Service) DeleteRule(ctx context.Context, req *svpb.DeleteRuleRequest) (*emptypb.Empty, error)
- func (s *Service) DeployRules(req *svpb.DeployRulesRequest, stream svpb.Emitto_DeployRulesServer) error
- func (s *Service) ListLocations(ctx context.Context, req *svpb.ListLocationsRequest) (*svpb.ListLocationsResponse, error)
- func (s *Service) ListRules(ctx context.Context, req *svpb.ListRulesRequest) (*svpb.ListRulesResponse, error)
- func (s *Service) ModifyLocation(ctx context.Context, req *svpb.ModifyLocationRequest) (*emptypb.Empty, error)
- func (s *Service) ModifyRule(ctx context.Context, req *svpb.ModifyRuleRequest) (*emptypb.Empty, error)
- func (s *Service) Process(ctx context.Context, m *fspb.Message) (*fspb.EmptyMessage, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateUpdateMask ¶
ValidateUpdateMask confirms whether the specified update field mask is valid for the respective object. If not, the invalid fields are returned in the error.
Types ¶
type FleetspeakAdminClient ¶
type FleetspeakAdminClient interface { // Insert a SensorRequest message for delivery. InsertMessage(ctx context.Context, req *spb.SensorRequest, id []byte) error // List all clients. ListClients(ctx context.Context) ([]*fsspb.Client, error) // Close the RPC connection. Close() error }
FleetspeakAdminClient represents a Fleetspeak admin client.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service contains handlers for Emitto server functions.
func (*Service) AddLocation ¶
func (s *Service) AddLocation(ctx context.Context, req *svpb.AddLocationRequest) (*emptypb.Empty, error)
AddLocation adds the provided Location.
func (*Service) DeleteLocation ¶
func (s *Service) DeleteLocation(ctx context.Context, req *svpb.DeleteLocationRequest) (*emptypb.Empty, error)
DeleteLocation deletes an existing Location by Location Name.
func (*Service) DeleteRule ¶
func (s *Service) DeleteRule(ctx context.Context, req *svpb.DeleteRuleRequest) (*emptypb.Empty, error)
DeleteRule deletes an existing Rule by Rule ID.
func (*Service) DeployRules ¶
func (s *Service) DeployRules(req *svpb.DeployRulesRequest, stream svpb.Emitto_DeployRulesServer) error
DeployRules generates a rule file and deploys it to the sensors in the provided location.
func (*Service) ListLocations ¶
func (s *Service) ListLocations(ctx context.Context, req *svpb.ListLocationsRequest) (*svpb.ListLocationsResponse, error)
ListLocations returns all Locations.
func (*Service) ListRules ¶
func (s *Service) ListRules(ctx context.Context, req *svpb.ListRulesRequest) (*svpb.ListRulesResponse, error)
ListRules returns Rules for the provided Rule IDs.
func (*Service) ModifyLocation ¶
func (s *Service) ModifyLocation(ctx context.Context, req *svpb.ModifyLocationRequest) (*emptypb.Empty, error)
ModifyLocation updates the specified location.
func (*Service) ModifyRule ¶
func (s *Service) ModifyRule(ctx context.Context, req *svpb.ModifyRuleRequest) (*emptypb.Empty, error)
ModifyRule modifies an existing Rule with the provided field mask.