@@ -50,12 +50,6 @@ type Sandbox interface {
5050 ResolveService (name string ) ([]* net.SRV , []net.IP , error )
5151 // Endpoints returns all the endpoints connected to the sandbox
5252 Endpoints () []Endpoint
53- // EnableService makes a managed container's service available by adding the
54- // endpoint to the service load balancer and service discovery
55- EnableService () error
56- // DisableService removes a managed contianer's endpoints from the load balancer
57- // and service discovery
58- DisableService () error
5953}
6054
6155// SandboxOption is an option setter function type used to pass various options to
@@ -728,30 +722,6 @@ func (sb *sandbox) SetKey(basePath string) error {
728722 return nil
729723}
730724
731- func (sb * sandbox ) EnableService () error {
732- for _ , ep := range sb .getConnectedEndpoints () {
733- if ep .casServiceEnabled (false , true ) {
734- if e := ep .addToCluster (); e != nil {
735- ep .setServiceEnabled (false )
736- return fmt .Errorf ("could not update state for endpoint %s into cluster: %v" , ep .Name (), e )
737- }
738- }
739- }
740- return nil
741- }
742-
743- func (sb * sandbox ) DisableService () error {
744- for _ , ep := range sb .getConnectedEndpoints () {
745- if ep .casServiceEnabled (true , false ) {
746- if e := ep .deleteFromCluster (); e != nil {
747- ep .setServiceEnabled (true )
748- return fmt .Errorf ("could not delete state for endpoint %s from cluster: %v" , ep .Name (), e )
749- }
750- }
751- }
752- return nil
753- }
754-
755725func releaseOSSboxResources (osSbox osl.Sandbox , ep * endpoint ) {
756726 for _ , i := range osSbox .Info ().Interfaces () {
757727 // Only remove the interfaces owned by this endpoint from the sandbox.
0 commit comments