-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from TRON-US/BTFS-1118-beta
Btfs-1118
- Loading branch information
Showing
8 changed files
with
615 additions
and
1,110 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package grpc | ||
|
||
import ( | ||
"context" | ||
"github.com/tron-us/go-btfs-common/protos/escrow" | ||
) | ||
|
||
func EscrowClient(addr string) *EscrowClientBuilder { | ||
return &EscrowClientBuilder{builder(addr)} | ||
} | ||
|
||
type EscrowClientBuilder struct { | ||
ClientBuilder | ||
} | ||
|
||
func (g *EscrowClientBuilder) WithContext(ctx context.Context, f func(ctx context.Context, client escrow.EscrowServiceClient) error) error { | ||
return g.doWithContext(ctx, f) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package grpc | ||
|
||
import ( | ||
"context" | ||
"github.com/tron-us/go-btfs-common/protos/guard" | ||
) | ||
|
||
func GuardClient(addr string) *GuardClientBuilder { | ||
return &GuardClientBuilder{builder(addr)} | ||
} | ||
|
||
type GuardClientBuilder struct { | ||
ClientBuilder | ||
} | ||
|
||
func (g *GuardClientBuilder) WithContext(ctx context.Context, f func(ctx context.Context, client guard.GuardServiceClient) error) error { | ||
return g.doWithContext(ctx, f) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package grpc | ||
|
||
import ( | ||
"context" | ||
"github.com/tron-us/go-btfs-common/protos/hub" | ||
) | ||
|
||
func HubQueryClient(addr string) *HubQueryClientBuilder { | ||
return &HubQueryClientBuilder{builder(addr)} | ||
} | ||
|
||
type HubQueryClientBuilder struct { | ||
ClientBuilder | ||
} | ||
|
||
func (g *HubQueryClientBuilder) WithContext(ctx context.Context, f func(ctx context.Context, client hub.HubQueryClient) error) error { | ||
return g.doWithContext(ctx, f) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package grpc | ||
|
||
import ( | ||
"context" | ||
"github.com/tron-us/go-btfs-common/protos/status" | ||
) | ||
|
||
func StatusClient(addr string) *StatusClientBuilder { | ||
return &StatusClientBuilder{builder(addr)} | ||
} | ||
|
||
type StatusClientBuilder struct { | ||
ClientBuilder | ||
} | ||
|
||
func (g *StatusClientBuilder) WithContext(ctx context.Context, f func(ctx context.Context, client status.StatusClient) error) error { | ||
return g.doWithContext(ctx, f) | ||
} |