| Index: go/src/infra/crimson/server/frontend/crimson_service.go
|
| diff --git a/go/src/infra/crimson/server/frontend/crimson_service.go b/go/src/infra/crimson/server/frontend/crimson_service.go
|
| index 3fca5d54ddd5bbd0afb89dcb5eb9ccf1833e3c2b..b9b5209ea0d3d7ce31bb1e97cee19bbbd8df36c0 100644
|
| --- a/go/src/infra/crimson/server/frontend/crimson_service.go
|
| +++ b/go/src/infra/crimson/server/frontend/crimson_service.go
|
| @@ -57,3 +57,17 @@ func (s *crimsonService) ReadIPRange(ctx context.Context, req *crimson.IPRangeQu
|
| }
|
| return &ret, nil
|
| }
|
| +
|
| +func (s *crimsonService) CreateHost(ctx context.Context, req *crimson.HostList) (*crimson.HostStatus, error) {
|
| + err := crimsondb.InsertHost(ctx, req)
|
| + return &crimson.HostStatus{}, userErrorToGRPCError(err)
|
| +}
|
| +
|
| +func (s *crimsonService) ReadHost(ctx context.Context, req *crimson.HostQuery) (*crimson.HostList, error) {
|
| + rows, err := crimsondb.SelectHost(ctx, req)
|
| +
|
| + if err == nil {
|
| + return rows, nil
|
| + }
|
| + return nil, userErrorToGRPCError(err)
|
| +}
|
|
|