Rename task manager to shim manager

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
Maksym Pavlenko
2021-08-25 17:00:27 -07:00
parent c8e88447ad
commit 2d5d3541e6
5 changed files with 118 additions and 105 deletions

View File

@@ -60,7 +60,7 @@ type binary struct {
bundle *Bundle
}
func (b *binary) Start(ctx context.Context, opts *types.Any, onClose func()) (_ *shim, err error) {
func (b *binary) Start(ctx context.Context, opts *types.Any, onClose func()) (_ *shimTask, err error) {
args := []string{"-id", b.bundle.ID}
switch logrus.GetLevel() {
case logrus.DebugLevel, logrus.TraceLevel:
@@ -128,10 +128,12 @@ func (b *binary) Start(ctx context.Context, opts *types.Any, onClose func()) (_
f.Close()
}
client := ttrpc.NewClient(conn, ttrpc.WithOnClose(onCloseWithShimLog))
return &shim{
bundle: b.bundle,
client: client,
task: task.NewTaskClient(client),
return &shimTask{
shim: &shim{
bundle: b.bundle,
client: client,
},
task: task.NewTaskClient(client),
}, nil
}