Documentation ¶
Overview ¶
Package lintflow_core is a generated protocol buffer package.
It is generated from these files:
proto/inspector.proto proto/lookupd.proto proto/reporter.proto proto/resourcer.proto proto/validator.proto
It has these top-level messages:
Task Progress Service ListRequest ListResponse RegisterRequest RegisterResponse Problem ReportSummary ConfigRequest Resource ValidationTask ValidateProgress
Index ¶
- Variables
- func RegisterInspectorServiceServer(s *grpc.Server, srv InspectorServiceServer)
- func RegisterLookupdServiceServer(s *grpc.Server, srv LookupdServiceServer)
- func RegisterReporterServiceServer(s *grpc.Server, srv ReporterServiceServer)
- func RegisterResourcerServiceServer(s *grpc.Server, srv ResourcerServiceServer)
- func RegisterValidatorServiceServer(s *grpc.Server, srv ValidatorServiceServer)
- type ConfigRequest
- type InspectorServiceClient
- type InspectorServiceServer
- type InspectorService_InspectClient
- type InspectorService_InspectServer
- type ListRequest
- type ListRequest_SearchType
- type ListResponse
- type LookupdServiceClient
- type LookupdServiceServer
- type Problem
- type Problem_Detail
- type Progress
- type RegisterRequest
- type RegisterResponse
- type ReportSummary
- type ReporterServiceClient
- type ReporterServiceServer
- type ReporterService_RecordClient
- type ReporterService_RecordServer
- type Resource
- type ResourcerServiceClient
- type ResourcerServiceServer
- type ResourcerService_GetClient
- type ResourcerService_GetServer
- type Service
- type Service_Type
- type Task
- type Task_Args
- type ValidateProgress
- func (*ValidateProgress) Descriptor() ([]byte, []int)
- func (m *ValidateProgress) GetReporter() *ValidateProgress_Progress
- func (m *ValidateProgress) GetResourser() *ValidateProgress_Progress
- func (*ValidateProgress) ProtoMessage()
- func (m *ValidateProgress) Reset()
- func (m *ValidateProgress) String() string
- type ValidateProgress_Progress
- type ValidationTask
- type ValidationTask_Args
- type ValidatorServiceClient
- type ValidatorServiceServer
- type ValidatorService_ValidateClient
- type ValidatorService_ValidateServer
Constants ¶
This section is empty.
Variables ¶
View Source
var ListRequest_SearchType_name = map[int32]string{
0: "ANY",
1: "RESOURCER",
2: "LINTER",
3: "REPORTER",
}
View Source
var ListRequest_SearchType_value = map[string]int32{
"ANY": 0,
"RESOURCER": 1,
"LINTER": 2,
"REPORTER": 3,
}
View Source
var Service_Type_name = map[int32]string{
0: "RESOURCER",
1: "LINTER",
2: "REPORTER",
}
View Source
var Service_Type_value = map[string]int32{
"RESOURCER": 0,
"LINTER": 1,
"REPORTER": 2,
}
Functions ¶
func RegisterInspectorServiceServer ¶
func RegisterInspectorServiceServer(s *grpc.Server, srv InspectorServiceServer)
func RegisterLookupdServiceServer ¶
func RegisterLookupdServiceServer(s *grpc.Server, srv LookupdServiceServer)
func RegisterReporterServiceServer ¶
func RegisterReporterServiceServer(s *grpc.Server, srv ReporterServiceServer)
func RegisterResourcerServiceServer ¶
func RegisterResourcerServiceServer(s *grpc.Server, srv ResourcerServiceServer)
func RegisterValidatorServiceServer ¶
func RegisterValidatorServiceServer(s *grpc.Server, srv ValidatorServiceServer)
Types ¶
type ConfigRequest ¶
type ConfigRequest struct { // сам конфиг для получения данных Config []byte `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` }
func (*ConfigRequest) Descriptor ¶
func (*ConfigRequest) Descriptor() ([]byte, []int)
func (*ConfigRequest) ProtoMessage ¶
func (*ConfigRequest) ProtoMessage()
func (*ConfigRequest) Reset ¶
func (m *ConfigRequest) Reset()
func (*ConfigRequest) String ¶
func (m *ConfigRequest) String() string
type InspectorServiceClient ¶
type InspectorServiceClient interface { // run task to inspectation Inspect(ctx context.Context, in *Task, opts ...grpc.CallOption) (InspectorService_InspectClient, error) // return avialability services for usage Services(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) }
func NewInspectorServiceClient ¶
func NewInspectorServiceClient(cc *grpc.ClientConn) InspectorServiceClient
type InspectorServiceServer ¶
type InspectorServiceServer interface { // run task to inspectation Inspect(*Task, InspectorService_InspectServer) error // return avialability services for usage Services(context.Context, *ListRequest) (*ListResponse, error) }
type InspectorService_InspectClient ¶
type InspectorService_InspectClient interface { Recv() (*Progress, error) grpc.ClientStream }
type InspectorService_InspectServer ¶
type InspectorService_InspectServer interface { Send(*Progress) error grpc.ServerStream }
type ListRequest ¶
type ListRequest struct {
Type ListRequest_SearchType `protobuf:"varint,1,opt,name=type,enum=lintflow.core.ListRequest_SearchType" json:"type,omitempty"`
}
func (*ListRequest) Descriptor ¶
func (*ListRequest) Descriptor() ([]byte, []int)
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) Reset ¶
func (m *ListRequest) Reset()
func (*ListRequest) String ¶
func (m *ListRequest) String() string
type ListRequest_SearchType ¶
type ListRequest_SearchType int32
const ( ListRequest_ANY ListRequest_SearchType = 0 ListRequest_RESOURCER ListRequest_SearchType = 1 ListRequest_LINTER ListRequest_SearchType = 2 ListRequest_REPORTER ListRequest_SearchType = 3 )
func (ListRequest_SearchType) EnumDescriptor ¶
func (ListRequest_SearchType) EnumDescriptor() ([]byte, []int)
func (ListRequest_SearchType) String ¶
func (x ListRequest_SearchType) String() string
type ListResponse ¶
type ListResponse struct {
Services []*Service `protobuf:"bytes,1,rep,name=services" json:"services,omitempty"`
}
func (*ListResponse) Descriptor ¶
func (*ListResponse) Descriptor() ([]byte, []int)
func (*ListResponse) GetServices ¶
func (m *ListResponse) GetServices() []*Service
func (*ListResponse) ProtoMessage ¶
func (*ListResponse) ProtoMessage()
func (*ListResponse) Reset ¶
func (m *ListResponse) Reset()
func (*ListResponse) String ¶
func (m *ListResponse) String() string
type LookupdServiceClient ¶
type LookupdServiceClient interface { // метод позволяет сервисам реистриваться сервисам // для того чтобы потом их можно было использовать инспектору Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) }
func NewLookupdServiceClient ¶
func NewLookupdServiceClient(cc *grpc.ClientConn) LookupdServiceClient
type LookupdServiceServer ¶
type LookupdServiceServer interface { // метод позволяет сервисам реистриваться сервисам // для того чтобы потом их можно было использовать инспектору Register(context.Context, *RegisterRequest) (*RegisterResponse, error) List(context.Context, *ListRequest) (*ListResponse, error) }
type Problem ¶
type Problem struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Original []byte `protobuf:"bytes,2,opt,name=original,proto3" json:"original,omitempty"` Details []*Problem_Detail `protobuf:"bytes,3,rep,name=details" json:"details,omitempty"` }
func (*Problem) Descriptor ¶
func (*Problem) GetDetails ¶
func (m *Problem) GetDetails() []*Problem_Detail
func (*Problem) ProtoMessage ¶
func (*Problem) ProtoMessage()
type Problem_Detail ¶
type Problem_Detail struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Fragment []byte `protobuf:"bytes,2,opt,name=fragment,proto3" json:"fragment,omitempty"` Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"` }
func (*Problem_Detail) Descriptor ¶
func (*Problem_Detail) Descriptor() ([]byte, []int)
func (*Problem_Detail) ProtoMessage ¶
func (*Problem_Detail) ProtoMessage()
func (*Problem_Detail) Reset ¶
func (m *Problem_Detail) Reset()
func (*Problem_Detail) String ¶
func (m *Problem_Detail) String() string
type Progress ¶
type Progress struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Total int64 `protobuf:"varint,2,opt,name=total" json:"total,omitempty"` Current int64 `protobuf:"varint,3,opt,name=current" json:"current,omitempty"` Link string `protobuf:"bytes,4,opt,name=link" json:"link,omitempty"` Problems int64 `protobuf:"varint,5,opt,name=problems" json:"problems,omitempty"` }
func (*Progress) Descriptor ¶
func (*Progress) ProtoMessage ¶
func (*Progress) ProtoMessage()
type RegisterRequest ¶
type RegisterRequest struct {
Service *Service `protobuf:"bytes,1,opt,name=service" json:"service,omitempty"`
}
запрос на регистрацию сервиса
func (*RegisterRequest) Descriptor ¶
func (*RegisterRequest) Descriptor() ([]byte, []int)
func (*RegisterRequest) GetService ¶
func (m *RegisterRequest) GetService() *Service
func (*RegisterRequest) ProtoMessage ¶
func (*RegisterRequest) ProtoMessage()
func (*RegisterRequest) Reset ¶
func (m *RegisterRequest) Reset()
func (*RegisterRequest) String ¶
func (m *RegisterRequest) String() string
type RegisterResponse ¶
type RegisterResponse struct {
Ok bool `protobuf:"varint,1,opt,name=ok" json:"ok,omitempty"`
}
ответ на регистрацию
func (*RegisterResponse) Descriptor ¶
func (*RegisterResponse) Descriptor() ([]byte, []int)
func (*RegisterResponse) ProtoMessage ¶
func (*RegisterResponse) ProtoMessage()
func (*RegisterResponse) Reset ¶
func (m *RegisterResponse) Reset()
func (*RegisterResponse) String ¶
func (m *RegisterResponse) String() string
type ReportSummary ¶
type ReportSummary struct { Link string `protobuf:"bytes,1,opt,name=link" json:"link,omitempty"` Total int64 `protobuf:"varint,2,opt,name=total" json:"total,omitempty"` }
func (*ReportSummary) Descriptor ¶
func (*ReportSummary) Descriptor() ([]byte, []int)
func (*ReportSummary) ProtoMessage ¶
func (*ReportSummary) ProtoMessage()
func (*ReportSummary) Reset ¶
func (m *ReportSummary) Reset()
func (*ReportSummary) String ¶
func (m *ReportSummary) String() string
type ReporterServiceClient ¶
type ReporterServiceClient interface {
Record(ctx context.Context, opts ...grpc.CallOption) (ReporterService_RecordClient, error)
}
func NewReporterServiceClient ¶
func NewReporterServiceClient(cc *grpc.ClientConn) ReporterServiceClient
type ReporterServiceServer ¶
type ReporterServiceServer interface {
Record(ReporterService_RecordServer) error
}
type ReporterService_RecordClient ¶
type ReporterService_RecordClient interface { Send(*Problem) error CloseAndRecv() (*ReportSummary, error) grpc.ClientStream }
type ReporterService_RecordServer ¶
type ReporterService_RecordServer interface { SendAndClose(*ReportSummary) error Recv() (*Problem, error) grpc.ServerStream }
type Resource ¶
type Resource struct { Header string `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` Body []byte `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` Total int64 `protobuf:"varint,3,opt,name=total" json:"total,omitempty"` }
func (*Resource) Descriptor ¶
func (*Resource) ProtoMessage ¶
func (*Resource) ProtoMessage()
type ResourcerServiceClient ¶
type ResourcerServiceClient interface { // валидатор запросит паритию данных, получит их по стриму и дальше попросит по стриму еще данных Get(ctx context.Context, in *ConfigRequest, opts ...grpc.CallOption) (ResourcerService_GetClient, error) }
func NewResourcerServiceClient ¶
func NewResourcerServiceClient(cc *grpc.ClientConn) ResourcerServiceClient
type ResourcerServiceServer ¶
type ResourcerServiceServer interface { // валидатор запросит паритию данных, получит их по стриму и дальше попросит по стриму еще данных Get(*ConfigRequest, ResourcerService_GetServer) error }
type ResourcerService_GetClient ¶
type ResourcerService_GetClient interface { Recv() (*Resource, error) grpc.ClientStream }
type ResourcerService_GetServer ¶
type ResourcerService_GetServer interface { Send(*Resource) error grpc.ServerStream }
type Service ¶
type Service struct { // юникальный идентификатор сервиса Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` // адрес сервиса в сети // как пример localhost:45679 Address string `protobuf:"bytes,2,opt,name=address" json:"address,omitempty"` Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"` Description string `protobuf:"bytes,4,opt,name=description" json:"description,omitempty"` Tags []string `protobuf:"bytes,5,rep,name=tags" json:"tags,omitempty"` // декларирует тип сервиса Type Service_Type `protobuf:"varint,6,opt,name=type,enum=lintflow.core.Service_Type" json:"type,omitempty"` // конфигруатор сервиса // там описана специфика севиса для выполенкния задач TaskConfig []byte `protobuf:"bytes,7,opt,name=task_config,json=taskConfig,proto3" json:"task_config,omitempty"` }
тип сервис описывает объект сервиса
func (*Service) Descriptor ¶
func (*Service) ProtoMessage ¶
func (*Service) ProtoMessage()
type Service_Type ¶
type Service_Type int32
const ( Service_RESOURCER Service_Type = 0 Service_LINTER Service_Type = 1 Service_REPORTER Service_Type = 2 )
func (Service_Type) EnumDescriptor ¶
func (Service_Type) EnumDescriptor() ([]byte, []int)
func (Service_Type) String ¶
func (x Service_Type) String() string
type Task ¶
type Task struct { Validators *Task_Args `protobuf:"bytes,1,opt,name=validators" json:"validators,omitempty"` Reporters *Task_Args `protobuf:"bytes,2,opt,name=reporters" json:"reporters,omitempty"` Resourcers *Task_Args `protobuf:"bytes,3,opt,name=resourcers" json:"resourcers,omitempty"` }
func (*Task) Descriptor ¶
func (*Task) GetReporters ¶
func (*Task) GetResourcers ¶
func (*Task) GetValidators ¶
func (*Task) ProtoMessage ¶
func (*Task) ProtoMessage()
type Task_Args ¶
type Task_Args struct { Service *Service `protobuf:"bytes,1,opt,name=service" json:"service,omitempty"` Config []byte `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` }
func (*Task_Args) Descriptor ¶
func (*Task_Args) GetService ¶
func (*Task_Args) ProtoMessage ¶
func (*Task_Args) ProtoMessage()
type ValidateProgress ¶
type ValidateProgress struct { Reporter *ValidateProgress_Progress `protobuf:"bytes,1,opt,name=reporter" json:"reporter,omitempty"` Resourser *ValidateProgress_Progress `protobuf:"bytes,2,opt,name=resourser" json:"resourser,omitempty"` LinkToReport string `protobuf:"bytes,3,opt,name=link_to_report,json=linkToReport" json:"link_to_report,omitempty"` }
func (*ValidateProgress) Descriptor ¶
func (*ValidateProgress) Descriptor() ([]byte, []int)
func (*ValidateProgress) GetReporter ¶
func (m *ValidateProgress) GetReporter() *ValidateProgress_Progress
func (*ValidateProgress) GetResourser ¶
func (m *ValidateProgress) GetResourser() *ValidateProgress_Progress
func (*ValidateProgress) ProtoMessage ¶
func (*ValidateProgress) ProtoMessage()
func (*ValidateProgress) Reset ¶
func (m *ValidateProgress) Reset()
func (*ValidateProgress) String ¶
func (m *ValidateProgress) String() string
type ValidateProgress_Progress ¶
type ValidateProgress_Progress struct { // ID of service Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` // all data Total int64 `protobuf:"varint,2,opt,name=total" json:"total,omitempty"` // already processed Current int64 `protobuf:"varint,3,opt,name=current" json:"current,omitempty"` }
func (*ValidateProgress_Progress) Descriptor ¶
func (*ValidateProgress_Progress) Descriptor() ([]byte, []int)
func (*ValidateProgress_Progress) ProtoMessage ¶
func (*ValidateProgress_Progress) ProtoMessage()
func (*ValidateProgress_Progress) Reset ¶
func (m *ValidateProgress_Progress) Reset()
func (*ValidateProgress_Progress) String ¶
func (m *ValidateProgress_Progress) String() string
type ValidationTask ¶
type ValidationTask struct { Config []byte `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` Reporter *ValidationTask_Args `protobuf:"bytes,2,opt,name=reporter" json:"reporter,omitempty"` Resourcer *ValidationTask_Args `protobuf:"bytes,3,opt,name=resourcer" json:"resourcer,omitempty"` }
func (*ValidationTask) Descriptor ¶
func (*ValidationTask) Descriptor() ([]byte, []int)
func (*ValidationTask) GetReporter ¶
func (m *ValidationTask) GetReporter() *ValidationTask_Args
func (*ValidationTask) GetResourcer ¶
func (m *ValidationTask) GetResourcer() *ValidationTask_Args
func (*ValidationTask) ProtoMessage ¶
func (*ValidationTask) ProtoMessage()
func (*ValidationTask) Reset ¶
func (m *ValidationTask) Reset()
func (*ValidationTask) String ¶
func (m *ValidationTask) String() string
type ValidationTask_Args ¶
type ValidationTask_Args struct { Service *Service `protobuf:"bytes,1,opt,name=service" json:"service,omitempty"` Config []byte `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` }
func (*ValidationTask_Args) Descriptor ¶
func (*ValidationTask_Args) Descriptor() ([]byte, []int)
func (*ValidationTask_Args) GetService ¶
func (m *ValidationTask_Args) GetService() *Service
func (*ValidationTask_Args) ProtoMessage ¶
func (*ValidationTask_Args) ProtoMessage()
func (*ValidationTask_Args) Reset ¶
func (m *ValidationTask_Args) Reset()
func (*ValidationTask_Args) String ¶
func (m *ValidationTask_Args) String() string
type ValidatorServiceClient ¶
type ValidatorServiceClient interface {
Validate(ctx context.Context, in *ValidationTask, opts ...grpc.CallOption) (ValidatorService_ValidateClient, error)
}
func NewValidatorServiceClient ¶
func NewValidatorServiceClient(cc *grpc.ClientConn) ValidatorServiceClient
type ValidatorServiceServer ¶
type ValidatorServiceServer interface {
Validate(*ValidationTask, ValidatorService_ValidateServer) error
}
type ValidatorService_ValidateClient ¶
type ValidatorService_ValidateClient interface { Recv() (*ValidateProgress, error) grpc.ClientStream }
type ValidatorService_ValidateServer ¶
type ValidatorService_ValidateServer interface { Send(*ValidateProgress) error grpc.ServerStream }
Click to show internal directories.
Click to hide internal directories.